Integrating with Microsoft 365
Integrating your ServiceNow instance with the Microsoft 365 service enables you to track your software subscriptions and software usage to determine license compliance and act on optimization opportunities.
For more information about the Microsoft 365 services, see Microsoft 365 plans.
| Process | Required user role in the Microsoft 365 application | Authentication scopes |
|---|---|---|
| Download subscriptions | Application developer |
|
| Pull user activity |
|
Reports.Read.All |
Register a Microsoft Azure AD application
Register an application through the Microsoft Azure portal.
Before you begin
Microsoft Azure AD Role required: Refer to the Minimal user permissions table.
Procedure
What to do next
After you successfully register and set up your application, remain in the Microsoft Azure portal if you need to enable your application to access Power BI service content and APIs.
Enable service principal authentication for Power-BI read-only APIs
Grant your application access to Power BI service content and APIs by enabling service principal authentication for Power BI read-only APIs. Power BI service content and APIs help optimize your Microsoft 365 subscriptions, such as by downgrading subscriptions from Office 365 E5 to Office 365 E3.
Before you begin
Microsoft Azure AD Role required: global administrator
Power BI Role required: global administrator or Power BI administrator
About this task
Service principal is an authentication method that allows your application to access secure Microsoft Azure AD resources, such as Power BI service content and APIs.
Procedure
Configure updates on Microsoft 365 Admin Center
Prevent anonymous user information in Microsoft 365 reports on activity to be imported to ServiceNow.
Before you begin
Role required: admin
Procedure
Create a Microsoft 365 integration profile
Create an integration profile to track software subscriptions and optimize stale licenses for the Microsoft 365 service.
Before you begin
ServiceNow Role required: sam_integrator or admin
- Software Asset Management Professional for Microsoft plugin (com.snc.samp.microsoft)
- Software Asset Management - SaaS License Management (sn_sam_saas_int) plugin from the ServiceNow Store
For more information, see Request SaaS License Management.
About this task
If you’re using Software Asset Workspace, the option to create the direct integration profile in Core UI is inactive.
Procedure
What to do next
When you create an integration profile, a reclamation rule is automatically created for the software. It's important that you review the reclamation rule to ensure that it meets your specifications. You can view all automatically generated reclamation rules for Office 365 by navigating to . Reclamation rules are applied based on the Microsoft System Center Configuration Management (SCCM) usage data that is pulled through the Microsoft SCCM usage integration. For more information on these reclamation rules, see Create a reclamation rule to import Microsoft SCCM usage data.
Determine and verify Microsoft 365 subscription information in your ServiceNow instance
Determine the exact software subscription information to be pulled from the Microsoft 365 admin center and verify if complete subscription information is pulled accurately to ServiceNow.
Before you begin
Role required: sam_admin
Procedure
Evaluating software usage activity for Microsoft 365 subscriptions
Evaluate software usage activity to discover active, inactive, and unassigned subscriptions among all subscriptions found on the Microsoft 365 portal.
Software usage activity is the usage of software products and by tracking the software usage activity that you can monitor license usage. This monitoring helps you optimize your existing software subscriptions.
The following table lists the sources for collecting the software usage activity, the associated platform support, and the supported Microsoft 365 products.
| Sources of software usage activity collection | Platform support | Supported Microsoft Office 365 products |
|---|---|---|
| Microsoft Graph APIs | Desktop, Web, Mobile | Outlook, Word, PowerPoint, Excel, OneNote, Teams, Exchange Online, SharePoint Online, Power BI |
| Microsoft SCCM or ACC-V | Desktop | Microsoft Office 365 apps for Enterprise |
| Jamf for macOS devices | Desktop | Microsoft Office 365 apps for Enterprise |
Monitoring software usage activity for license optimization
Based on the software usage activity, Software Asset Management generates optimization recommendations for your software subscriptions that include the following:
- Downgrades from Microsoft 365 E5 to E3 and E3 to E1
- Consolidated Microsoft 365 subscriptions
- Double licensed users with both Microsoft 365 and its applications (Office 365, Enterprise Mobility+Security (EMS), Windows) subscriptions
- Individual subscriptions for Microsoft Teams, Microsoft Exchange Online, Microsoft SharePoint Online, Microsoft OneDrive, and Power BI
- Unassigned user subscriptions
You can view the optimization recommendations on the Optimization and savings dashboard in workspace.
- Software Usages [samp_sw_usage]
View the usage data for individual software products within the subscription in the Software Usages table. This table stores total usage and last activity retrieved from Microsoft APIs and other discovery solutions such as SCCM, Jamf, and ACC-V. The SAM - Collect Microsoft 365 Usage scheduled job collects the usage data daily and the SAM - Create New Reclamation Candidates for Office 365 Integration generates the removal candidates weekly. For more details on software usage fields and their descriptions, see View or create software usage in workspace.
The Software Usages table includes the date when the software was last used and the type of the activities performed on the Desktop, Web, Mobile, or cumulative across platforms. The last activity data helps you select an optimized plan for individual products within your Microsoft 365 subscriptions. Software Asset Management generates a removal candidate for the current subscription by showing an optimized recommendation on the License workbench.
- Microsoft 365 Apps Usage Reports [samp_m365_apps_usage_report]
View the last activity date for the Microsoft 365 products in the Microsoft 365 Apps Usage Reports table for each user. This table stores usage data for Microsoft 365 products in True or False retrieved from Microsoft APIs only. The last activity date helps you determine reclamation candidates more accurately for Microsoft 365 products, including Microsoft Outlook, Microsoft Word, Excel, Microsoft PowerPoint, and OneNote. For more details on Microsoft 365 apps usage fields and their descriptions, see Microsoft 365 Apps Usage Reports.
License optimization for Microsoft subscriptions
Software usage activity helps you with license optimization by discovering reclamation candidates from both the individual Microsoft products and the Microsoft 365 suite subscriptions. You can determine the reclamation candidates both using APIs and discovery solutions.
- Downgrades from Microsoft 365 E5 to E3 and E3 to E1: Determine the number of licenses per month that can be downgraded or reclaimed based on generated downgrade candidates.Note:You can also determine usage for Microsoft Access and Publisher from additional discovery solutions, such as Microsoft SCCM or ACC-V for E3 to E1 optimization.
- Consolidated Microsoft 365 subscriptions: Find Microsoft 365 consolidate subscriptions reclamation candidates.
- Double licensed users: Determine the number of licenses per month that can be downgraded or reclaimed based on recommended candidates with both Microsoft 365 and its applications (Office 365, Enterprise Mobility+Security (EMS), Windows) subscriptions.
- Individual subscriptions: Reclamation rules are automatically created for individual subscriptions when the SAM - Import user subscription scheduled job runs. These individual subscriptions include Microsoft Teams, Microsoft Exchange Online, Microsoft SharePoint Online, Microsoft OneDrive, and Power BI. You can review the reclamation rules for individual subscriptions to fit your requirements. For more details, see Review a software reclamation rule.
Additionally, the subscription assignment date that is automatically populated from the Microsoft 365 portal helps in generating the reclamation candidates for individual subscriptions. The use of subscription assignment date instead of the record creation date on the ServiceNow AI Platform helps to create correct reclamation candidates based on the actual use from the Microsoft 365 portal.
Evaluate Microsoft 365 compliance and optimization results
Evaluate Microsoft 365 compliance and optimization results to find actual and potential cost savings and recommended licensing optimizations.
Before you begin
Role required: sam_admin or sam_user
The discovery of Microsoft 365 must be complete to evaluate the software compliance. For more information about using Discovery and Microsoft SCCM together, see Discovery and SCCM together.
The usage of Microsoft 365 plans must be available from both Microsoft certified APIs and Microsoft SCCM to evaluate the software optimization.
Procedure
Update REST and OAuth endpoints for Microsoft Office 365 Government plans
Change the endpoints of the REST message and OAuth application on your ServiceNow subscription profile so that you can use your subscriptions.
Before you begin
Role required: sam_admin
About this task
The ServiceNow AI Platform® supports Microsoft Office 365 Government plans, which provide all the features and capabilities of Microsoft 365 services in a segmented government cloud community that enables organizations to meet U.S. compliance and security standards.
For more information on Microsoft Office 365 Government plans, see Office 365 Government.
Procedure
Associate a user with subscription records
If the User field in the Software Subscription [samp_sw_subscription] table is empty, map the field with an associated user.
Before you begin
ServiceNow Role required: admin
About this task
SaaS integrations create subscription records in the Subscriptions [samp_sw_subscription] table. The fields on this table are populated by automated jobs and integrations. The User field is resolved based on the User principal name column value and verified against the email and user_name fields of the User [sys_user] table by default.
Procedure
- Update the User field on subscriptions manually.
By default, the integration overwrites the User field even if you set a value.
- Update the User field of the subscription record manually to overwrite the User column value that is automatically set by the integration.
After you update the value, the integration doesn't reset the value.
- If you want to switch back to the user logic of the integration, clear the User field value.
After you clear the value, the next integration execution repopulates the User field automatically.
- Update the User field of the subscription record manually to overwrite the User column value that is automatically set by the integration.
- Modify the user lookup logic for SaaS subscriptions.
If you have a different column for the user lookup, you might want to use it for lookup instead of the base system lookup.
- Open the Script include SAMSaasIntegrationUtils.
- Replace the getSysUser method call with the following script and your field name in the sys_user table to replace the <replace_field_name>.
getSysUser: function (upn) { if (upn) { var userGr = new GlideRecord('sys_user'); userGr.addActiveQuery(); userGr.addNotNullQuery('<replace_field_name>'); userGr.addQuery('<replace_field_name>', upn); userGr.setLimit(1); userGr.query(); if (userGr.next()) { return userGr; } } }