Configure API Service Graph Connector for Azure API Management using the guided setup
Set up scheduled import jobs to pull in Azure API Management data into your CMDB.
Before you begin
- The Integration Commons for CMDB store app, which is automatically installed. See Integration Commons for CMDB.
- The CMDB CI class models store app, which is automatically installed. See CMDB CI Class Models store app.
- The ITOM Discovery License plugin (com.snc.itom.discovery.license). You must activate this plugin.
- ITOM Licensing plugin (com.snc.itom.license). See Request Discovery.
- Application (client) ID
- Client Secret
- Directory (tenant) ID
- Connection URL
Role required: admin
Procedure
-
Verify that the application scope is set to the API Service Graph Connector for Azure API Management application by using the application picker.
For more information, see Application picker.
- Navigate to All > Service Graph Connectors > Azure API Management > Setup.
- On the API Service Graph Connector for Azure API Management page, verify that the Quick Start option is selected and then select Continue.
-
Configure the authentication credentials to send requests to the Azure API Management application.
- In the Configure the Connection and Credentials section of the API Service Graph Connector for Azure API Management page, select Start.
-
Configure the connection.
- Select the Configure Azure authentication credentials task.
- Select Click Here to open the Connections page in a separate browser tab.
- Search for and select Edit for Azure API Management Connection.
- In the Connection Information section of the Edit Connection window, fill in the fields.
Table 1. Connection Information Field Description Azure API Management Connection Name Name to identify the Azure API Management connection record. Azure API Management Connectionis the default credential alias name. You can add multiple Azure API Management instances. However, try not to modify the default connection name.Connection URL Base URL to connect to the Azure API Management service. Based on the region of your Azure client application, enter the URL in one of the following formats:- Global
https://management.azure.com - US Government
htttps://management.usgovcloudapi.net - China
https://management.chinacloudapi.cn - Germany
https://management.microsoftazure.de/
- Global
- In the Credential Information section of the Edit Connection window, fill in the fields.
Table 2. Credential Information Field Description OAuth Client ID Application (client) ID of your Azure client application as noted in the Before you begin section. OAuth Client Secret Client Secret of your Azure client application as noted in the Before you begin section. 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 noted in the Before you begin section.- 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 Edit and Get OAuth Token.
- Select Update.
- When the OAuth token flow is successfully completed, return to the guided setup page and set the Configure Azure authentication credentials task to complete by selecting the Mark as complete check box and then select Continue.
-
Configure a connection to manage Azure resources via Azure API Management.
- Select the Configure Properties task.
- In the Service Graph Connection Properties related list, enter the values for the properties.
Table 3. Service Graph Connection Properties Property Description CollectionPeriod(days) Duration in days for collecting API usage data. CollectUsageData Enable usage data collection to retrieve API usage data over a specified duration. Discovery Scope Discovery scope of the Azure client application. The available options are: - Management Group
- Select Management Group when the ServiceNow service account has access to data within the Azure management group.
- Subscription
- Select Subscription when the ServiceNow service account has access to data within the Azure subscription only.
ExcludeServices Azure API Management services that should be excluded from the connection. For multiple services, separate them with commas. All gateways except those listed in the ExcludeServices property are fetched.
GetNestedGroupSubscriptions Enable retrieving data from all nested child subscriptions when Management Group is set as the discovery scope. Set the property to
falseto exclude nested child subscriptions.ManagementGroupId Management group IDs of Azure API Management services. For multiple management groups, separate them with commas.
PartitionSize Partition size for Azure managed APIs if parallel loading is enabled. Accepts a numeric value greater than zero. If left empty, the value is automatically calculated.
ResourceGroups Resource group name of Azure API Management services. For multiple resource groups, separate their names with commas. If you leave this field empty, the data sources within the connector import data from all the available resource groups.
SubscriptionId Subscription IDs of Azure API Management services. For multiple subscription IDs, separate them with commas. If the discovery scope is set to Subscription and this field is left blank, all subscriptions for the specified tenant in the credentials are discovered.
Tip:To enter a property value, double-click (or use the keyboard shortcut) to enter a value in the Value cell for the property. - Set the Configure Properties task to complete by selecting the Mark as complete check box and then select Continue.
-
Test the connection.
- Select the Test Connection task.
- Test the connection by selecting the Test Connection related link.
Testing the connection might take a few moments. The page is refreshed to show the test results.
- When the Status field is set to Success, select Update.
If any of the tests have errors, follow the suggestions for remediation.
- Set the Test Connection task to complete by selecting the Mark as complete check box and then select Continue.
- Optional:
Integrate with multiple Azure API Management instances.
- In the Add Multiple Instances section of the API Service Graph Connector for Azure API Management page, select Start.
-
Enable creating data sources for the new Azure API Management connection.
- Verify that you have edit permissions for the Datasource [sys_data_source] table.
- Select the Update Data Source Access task.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Data Source form that opens in another tab, select the Can create, Can update, and Can delete check boxes.
- Select Update.
- From the application picker, select the API Service Graph Connector for Azure API Management application scope.
- Set the Update Data Source Access task to complete by selecting the Mark as complete check box and then select Continue.
-
Enable creating a scheduled import job for the new Azure API Management connection.
- Ensure that you have edit permissions for the Scheduled data import [scheduled_import_set] table.
- Select the Update Scheduled Data Import Access task.
- To edit the record, select the Global application scope from the application picker.
- In the Application Access related list of the Scheduled Data Import form, select the Can create, Can update, and Can delete check boxes.
- Select Update.
- From the application picker, select the API Service Graph Connector for Azure API Management application scope.
- Set the Update Scheduled Data Import Access task to complete by selecting the Mark as complete check box and then select Continue.
-
Clear the cache on the Data Source [sys_data_source] and Scheduled Data Imports [scheduled_import_set] tables.
- Select the Clear Cache for Data Source and Scheduled Data Imports tables task.
- 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 API Service Graph Connector for Azure API Management application scope.
- Set the Clear Cache for Data Source and Scheduled Data Imports tables task to complete by selecting Mark as Complete.
-
Add another connection for the new Azure API Management instance.
- Verify that the application scope is set to the API Service Graph Connector for Azure API Management application by using the application picker.
- Select the Add Another Connection task and then select Click Here.
- On the Connections page that opens in another browser tab, select Add Connection.
- In the Create Connection window, fill in the connection, credentials, and subscription ID details.
- Select Create and Get OAuth Token.
- Close the Connections page and return to the guided setup page tab.
- Set the Add Another Connection task to complete by selecting the Mark as complete check box and then select Continue.
-
Add properties for the new connection.
- Verify that the application scope is set to the API Service Graph Connector for Azure API Management application by using the application picker.
- Select the Add Properties to New Connections task.
- From the Name column, select the connection name you created in step 5.e.
- In the Service Graph Connection Properties related list, enter the values for the properties.
For more information on properties, see 4.c.ii.
Tip:To enter a property value, double-click (or use the keyboard shortcut) to enter a value in the Value cell for the property. - Set the Add Properties to New Connections task to complete by selecting the Mark as complete check box and then select Continue.
-
Test the new connection.
- Select the Test New Connections task.
- From the Name column, select the connection name you created in step 5.e.
- Test the connection by selecting the Test Connection related link.
Testing the connection might take a few moments. The page is refreshed to show the test results.
- When the Status field is set to Success, select Update.
If any of the tests have errors, follow the suggestions for remediation.
- Set the Test New Connections task to complete by selecting the Mark as complete check box and then select Continue.
-
Configure the scheduled job for the import of Azure API Management data.
- In the Set up Scheduled Import Jobs section of the API Service Graph Connector for Azure API Management page, select Start.
-
Select the API Management Services scheduled job.
For a multiple instance setup, select the scheduled import created with the connection in step 5.e.
-
On the Scheduled Data Import form, verify the field values.
For more information, see Schedule a data import.
- Select the Active check box to activate the scheduled job.
- In the Run field, select Periodically to specify how often the job will run.
- Select Update.
- Set the Set up Scheduled Import Jobs task to complete by selecting the Mark as complete check box and then select Continue.
- On the API Service Graph Connector for Azure API Management page, select Complete to save your changes.
- In the Complete setup dialog box, select Complete to complete the setup.
- In the message box that appears, select Done.