Configure API Service Graph Connector for Azure API Management using SGC Central
Set up scheduled import jobs to pull in Azure API Management data into your CMDB.
Before you begin
Install API Service Graph Connector for Azure API Management version 1.0.0 or later from the ServiceNow Store. For ServiceNow Store installation steps, see Install a ServiceNow Store application.
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
Role required: The following table shows the roles required for each stage of the playbook.
| Stage | Role |
|---|---|
| Prerequisites | admin |
| Setup | SGC-Admin (sn_cmdb_int_util.sgc_admin) or admin |
Note: The admin user role is required to run background scripts and to provide access to global tables to the SGC-Admin user. For information about the user roles for Service Graph Connectors, see Service Graph Connector user roles.
About this task
The playbook experience for onboarding connectors is activated with SGC Central in the CMDB Workspace. To configure the SGC Central application, see Configuring SGC Central and for more information on how to interact with a playbook, see Interact with Playbook.
Note: Alternatively, you can configure a default connection already available from the installed or draft connections in SGC Central. Go to All > Service Graph Connectors, then select Setup for the connector from the menu. To learn about installed and draft connections, see Managing connections added for Service Graph Connectors in SGC Central.
Procedure
Navigate to Workspaces > CMDB Workspace.
In the CMDB Workspace, select SGC Central.
On the Overview page, select Create connection.
Tip: Alternatively, you can select Create connection on the All connections page.
On the Create connection window, select the Azure API Management connector type, and then select Create connection.
Complete the initial prerequisites when setting up a connection for the first time using a connector.
Note: This step is required only during the first-time setup. See Perform initial setup tasks when creating a connection in SGC Central.
Enter connection details and test the API connection for importing Azure API Management data.
In the Setup stage of the playbook, select the Create and test connection activity.
On the form, fill in the fields.
| Field | Description |
|---|---|
| Azure API Management Connection Name | Name to identify the Azure API Management connection record.For example, `Azure API Management Connection`. |
| Connection URL | Base URL to connect to the Azure API Management service.Note: This field is automatically set to the URL to connect to the application. Leave the field value as is. |
| 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: - 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 ``` Where *<tenantid>* is the tenant ID of your Azure client application as noted in the Before you begin section. |
3. Select **Create and test connection**.
4. Once the connection test is complete, select **Continue**.
Set the configuration properties for the connection.
Note: To skip this step, select Continue for the Set configuration properties activity.
In the Setup stage of the playbook, select the Set configuration properties activity.
Fill in the property details.
| Property | Description |
|---|---|
| Azure API Management connection | |
| 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.
Select Subscription when the ServiceNow service account has access to data within the Azure subscription only. |
| Subscription | |
| Subscription Id\(s\) | 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. |
| Management Group | |
| Management Group Id\(s\) | Management group IDs of Azure API Management services. For multiple management groups, separate them with commas. |
| Get Nested Group Subscriptions | Option to enable retrieving data from all nested child subscriptions when Management Group is set as the discovery scope.Disable the property to exclude nested child subscriptions. |
| Optional Exclusive Configuration | |
| 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. |
| 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. |
| Usage Data Configuration | |
| CollectUsageData | option to enable usage data collection to retrieve API usage data over a specified duration. |
3. Select **Continue**.
Configure the import schedule to import data at regular intervals.
In the Setup stage of the playbook, select the Configure import schedule activity.
Expand the Parent scheduled data import within the Import schedules list to select the API Management Services import schedule associated with your connection.
Note: The connection name is prefixed to the schedule name.
In the Configure import schedule dialog box, select the Active check box, and then fill in the run schedule and time details.
For more information, see Schedule a data import.
Select Save.
Alternatively, select Execute Now to execute the import schedule immediately.
Select Continue.
In the Setup stage of the playbook, select the Confirm connection creation activity to verify whether the connection was created.
What to do next
Select View all connections to review the connection details. The created connection appears in the Installed connections list.
You can then manage connections from the SGC Central view of the CMDB Workspace. For more information, see Managing connections added for Service Graph Connectors in SGC Central.
Related topics
API Service Graph Connector for Azure API Management
Target tables for storing API Service Graph Connector for Azure API Management data