Configure Service Graph Connector for Microsoft Azure using the guided setup
- UpdatedApr 27, 2025
- 9 minutes to read
- Yokohama
- Now Platform Capabilities
Set up data sources and scheduled import jobs to pull in data from Azure into your CMDB.
Before you begin
To use this Service Graph Connector, you need a subscription to a Subscription Unit that is based in the IT Operations Management (ITOM) Visibility application or in the ITOM Discovery application. As defined in the section titled "Managed IT Resource Types" in ServiceNow Subscription Unit Overview for your subscription, for managed IT resources that are created or modified in the CMDB by this Service Graph Connector, but that aren’t yet managed by ITOM Visibility or ITOM Discovery, these resources will increase Subscription Unit consumption from that application. Review your current Subscription Unit consumption within ITOM Visibility or ITOM Discovery to ensure available capacity.
- The Integration Commons for CMDB store app, which is automatically installed.
- The CMDB CI class models store app, which is automatically installed. See CMDB CI Class Models.
- Discovery Core plugin (com.snc.discovery.core), which is automatically installed by Discovery.
- The Datastream Action plugin (com.glide.hub.action_type.datastream), which is automatically installed.
- The ITOM Discovery License plugin (com.snc.itom.discovery.license). You must activate this plugin.
- ITOM Licensing plugin (com.snc.itom.license). For more information, see Request Discovery.
false
. For more information, see Configuring data synchronization in Service Graph Connector for Microsoft Azure.Role required: admin
About this task
For more information on the Azure setup instructions, see the Service Graph Connector for Azure - Overview article on the ServiceNow Community site.
Procedure
- Navigate to All > Service Graph Connectors > Azure > Setup.
- On the Getting started page, select Get Started.
-
Create data sources and scheduled imports for the new connection.
- On the Service Graph Connector for Microsoft Azure page, in the Update Data Sources and Scheduled Imports Access, select the task Update Scheduled Data Import Access.
-
In the Update Scheduled Data Import Access section, select Configure and do the following:
- For the Update Scheduled Data Import access task, select Configure.
- Select the Global application scope by using the application picker.
- In the Application Access related list, select the Can create, Can update, and Can delete check boxes, if not already selected.
- Select Update to close the tab and return to the guided setup.
- Modify the application scope again to Service Graph Connector for Microsoft Azure by using the application picker.
- Set the Update Scheduled Data Import access task to complete by selecting Mark as Complete.
- Repeat the steps 3.b.ii to 3.b.v for the Update Data Source Access task with the Data Source [sys_data_source] table and set the task to complete by selecting Mark as Complete.
-
Clear the cache for the new connection.
- In the Clear Cache for Datasource and Import set section, select Configure.
- In the Run script text box of the background
script page, enter the following
script:
GlideTableManager.invalidateTable("sys_data_source"); GlideCacheManager.flushTable("sys_data_source"); GlideTableManager.invalidateTable("scheduled_import_set"); GlideCacheManager.flushTable("scheduled_import_set"); GlideTableManager.invalidateTable("sys_db_object"); GlideCacheManager.flushTable("sys_db_object");
- Select Run Script to run the background script in
the global scope.
The script may take several minutes to execute.
- After the script is executed, select Close.
- From the application picker, select the Service Graph Connector for Microsoft Azure application.
- Select Mark as Complete.
-
Create a connection to import hardware configuration items (CIs) from the Azure client application.
Note: Ensure that you have the
User.Read
permission on the Microsoft Graph API for the hardware import. Also, ensure that the IAM policy for the Azure subscription has the Reader role. See Assign a user as an administrator of an Azure subscription with conditions on the Microsoft Azure documentation site.-
Obtain the OAuth credentials from your Azure administrator.
Make a note of the following details:
- Application (client) ID
- Client Secret
- Directory (tenant) ID
- Connection URL
Note: After getting the OAuth credentials, in the guided setup for Service Graph Connector for Microsoft Azure, go to the Create connection for the hardware import section of the Service Graph Connector for Microsoft Azure page and set the Get the OAuth credentials task to complete by selecting Mark as Complete. -
Configure your Azure hardware connection and credentials.
- In the Create connection for the hardware import section of the Service Graph Connector for Microsoft Azure page, select Continue.
- For the Create or Edit connection task, select Configure.
- On the Connections page of the Workflow Studio, select Configure for the SG-Azure Hardware Connection connection that is available by default for the hardware import.
You can create multiple connections by selecting Add Connection.
- On the form, review and modify the fields.
Table 1. Configure Connection form Field Description Connection Information Connection Name Name to uniquely identify the hardware connection record. For example, SG-Azure Hardware Connection. Connection URL Base URL to connect to your Azure client application. Note: This field is automatically set to the URL to connect to the application. Leave the field value as is.Credential Information OAuth Client ID Application (client) ID of your Azure client application as described in step 4.a. OAuth Client Secret Client Secret of your Azure client application as described in step 4.a. OAuth Token URL Token URL of your Azure client application. Based on the region of your Azure client application, enter the token URL in one of the following formats:Where <tenantid> is the tenant ID of your Azure client application as described in step 4.a.- Global
https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/token
- US Government
https://login.microsoftonline.us/<tenantid>/oauth2/v2.0/token
- China
https://login.partner.microsoftonline.cn/<tenantid>/oauth2/v2.0/token
- Germany
https://login.microsoftonline.de/<tenantid>/oauth2/v2.0/token
- Global
- Select Configure and Get OAuth Token.
- When the OAuth token flow is successfully completed, return to the Create connection for the hardware import task page using the back button for your browser.
- Set the Create or Edit connection task to complete by selecting Mark as Complete.
-
Test the Microsoft Graph API connection to import hardware data from the Azure client application.
- For the Test Connection task, select Configure.
- Select the data source associated with the newly created connection in the Name column of the Data Sources list.
- Select the Test Load 20 Records related link.
- When the state changes to Complete, return to the setup by selecting Back to Guided Setup in the Help panel.
- Set the Test Connection task to complete by selecting Mark as Complete.
-
Review the scheduled data imports configuration.
- For the Set up scheduled import jobs task, select Configure.
- Select the SG-Azure Subscriptions scheduled job.
- On the Scheduled Data Import form, verify the field values for the scheduled job and select the Active check box.
For more information, see Schedule a data import.
- Select Update.
- Set the Set up scheduled import jobs task to complete by selecting Mark as Complete in the Help panel.
-
Obtain the OAuth credentials from your Azure administrator.
-
Create a connection to import software information from the Azure client application.
Note: Ensure that you have the
Data.Read
permission on the Log Analytics API for the software import.-
Obtain the OAuth credentials and set up the Log Analytics workspace in the Azure.
- Ensure that you have the OAuth credentials from step 4.a.
- Configure the Log Analytics workspace in the Azure client application.
- Use an existing workspace, if available.
- Create another workspace.
For more information, see Create Log Analytics workspace in the Azure documentation.
Note: Make a note of the Workspace ID. - Deploy Azure Monitoring Agent (AMA), and then enable change tracking and inventory using AMA.
For more information, see Enable Change Tracking and Inventory using Azure Monitoring Agent in the Azure documentation.
- Deploy Dependency Agent as part of VM insights to collect discovered data about VM processes and their connections.
For more information, see Enable VM Insights overview in the Azure documentation.
Note: After obtaining the OAuth credentials, in the guided setup for Service Graph Connector for Microsoft Azure, go to the Create connection for the software import section of the Service Graph Connector for Microsoft Azure page and set the Get the OAuth credentials task to complete by selecting Mark as Complete. -
Configure your Azure software connection and credentials.
- In the Create connection for the software import section of the Service Graph Connector for Microsoft Azure page, select Continue.
- For the Create or Edit connection task, select Configure.
- On the Connections page of the Workflow Studio, select Configure for the SG-Azure log analytics connection connection that is available by default for the software import.
You can create multiple connections by selecting Add Connection.
- On the form, review and modify the fields.
Table 2. Configure Connection form Field Description Connection Information Software Connection Name Name to uniquely identify the software connection record. For example, SG-Azure log analytics connection. Hardware Connection Name Name of the hardware connection associated with the software as described in step 4.b.iv. You add a hardware connection name to associate the software connection with the respective hardware.
Connection URL Base URL to connect to the Log Analytics workspace in the following format: Wherehttps://api.loganalytics.io/v1/workspaces/<workspace_id>
<workspace_id>
is the ID of the Log Analytics workspace as described in step 5.a.ii.Note: This field is automatically set to the URL to connect to the Log Analytics workspace. Replace the<workspace_id>
variable in the auto-generated URL with the workspace ID of your Log Analytics workspace.Credential Information OAuth Client ID Application (client) ID of your Azure client application as described in step 4.a. OAuth Client Secret Client Secret of your Azure client application as described in step 4.a. OAuth Token URL Token URL of your Azure client application. Based on the region of your Azure client application, enter the token URL in one of the following formats:Where <tenantid> is the tenant ID of your Azure client application as described in step 4.a.- Global
https://login.microsoftonline.com/<tenantid>/oauth2/v2.0/token
- US Government
https://login.microsoftonline.us/<tenantid>/oauth2/v2.0/token
- China
https://login.partner.microsoftonline.cn/<tenantid>/oauth2/v2.0/token
- Germany
https://login.microsoftonline.de/<tenantid>/oauth2/v2.0/token
- Global
- Select Configure and Get OAuth Token.
- When the OAuth token flow is successfully completed, return to the Create connection for the software import task page using the back button for your browser.
- Set the Create or Edit connection task to complete by selecting Mark as Complete.
-
Test the Log Analytics API connection to import software data from the Azure client application.
- For the Test Connection task, select Configure.
- Select the data source associated with the newly created connection in the Name column of the Data Sources list.
- Select the Test Load 20 Records related link.
- When the state changes to Complete, return to the setup by selecting Back to Guided Setup in the Help panel.
- Set the Test Connection task to complete by selecting Mark as Complete.
-
Review the scheduled data imports configuration.
- For the Set up scheduled import jobs task, select Configure.
- Select the SG-Azure Software scheduled data import.
- On the Scheduled Data Import form, verify the field values for the scheduled job and select the Active check box.
For more information, see Schedule a data import.
- Select Update.
- Set the Set up scheduled import jobs task to complete by selecting Mark as Complete in the Help panel.
-
Obtain the OAuth credentials and set up the Log Analytics workspace in the Azure.
- (Optional)
Enable extended discovery using the
run
command.The
run
command is used to run a set of commands on the VMs to fetch server information such as CPU count, cores, model, and manufacturer.-
Download the scripts that are required to enable extended discovery.
- For the Download the scripts task, select Configure.
- After the scripts are downloaded, select Mark as Complete to set the Download the scripts task to complete.
-
Configure an Azure storage account for extended discovery.
- For the Configure Azure Storage account for Run Command task, select Configure.
For information about configuring an Azure storage account for extended discovery, see the Instructions for setting up Run Command in Service Graph Connector for Azure [KB2001668] article in the Now Support Knowledge Base.
- Set up a new Azure storage account.
- Set up a container to upload the script files.
- Set up another container to store the results.
- Provide
run
command access to the service principal. - Select Mark as Complete to set the Configure Azure Storage account for Run Command task to complete.
- For the Configure Azure Storage account for Run Command task, select Configure.
-
Configure the connection properties for the new instance that you created for Service Graph Connector for Microsoft Azure.
- For the Configure connection properties task, select Configure.
- In the Connection* field of the SG-Azure Configuration Properties section, select the new instance that you created.
The fields in the Properties section are populated with the details of the instance.
- In the Properties section, provide the following details for the instance that you created:
- Name of the storage account where the containers are created
- Subscription ID where the storage account is created
- Resource group of the storage account
- Name of the container where the sh and ps1 files are uploaded in Azure
- Name of the container where the results of the commands are to be stored
- URI of the sh file that has to be run on Linux machines
- URI of the ps1 file that has to be run on Windows machines
- Select Save.
- Select Mark as Complete to set the Configure connection properties task to complete.
-
Download the scripts that are required to enable extended discovery.
Result