Prerequisites for Connecting to ServiceNow

This article outlines the prerequisites for connecting to ServiceNow. Before you begin, make sure you have the following:

  • OAuth connections require a client ID and client secret issued by your provider.
  • All connection types require specific permissions to be enabled — the exact scopes depend on your integration and are detailed in the sections below.

1. Enabling OAuth

  1. System OAuth: In the navigation bar, search for system oauth.
  2. Select Inbound Integrations.
  3. [New integration]
  4. Select OAuth - Authorization code grant.
  1. Name: Enter a name for the connection.
  2. Provider name: Select the provider name.
  3. Redirect URLs: Enter your redirect URL in the following format: https://<hostname>/data/editor/service/validate-oauth.
  4. Auth scope: Select the auth scope.
  5. Copy Client ID and Client secret.
  6. [Save]

2. Enabling Permissions

Our recommendation is to use a Service Account to connect to the ServiceNow Rest API. The Service Account requires the following permissions in ServiceNow in order to integrate properly with Metric Insights:

  1. Required Standard User Roles:
    • rest_api_explorer
    • web_service_admin
    • itil
    • personalize_dictionary
  2. Required Custom User Role:
    • u_just_db_viewer
      • The u_just_db_viewer role must be added to the following ACL tables (see image below):
        • sys_upgrade_history
        • sys_db_view

NOTE: Through the API, sys_upgrade_history is queried to get the ServiceNow version, and sys_db_view to get information about views. Both are required to pull data (if that is a use-case).

2.1. How to Find User Roles

  1. System Security: In the navigation bar, search for users.
  2. Select System Security > Users and Groups > Users.
  3. Select the user.
  4. Roles: Open the Roles tab.
  5. Click [Edit...]
  6. Collection: Search for the required Roles.

2.2. How to Find Tables

  1. Tables: In the navigation bar, search for tables.
  2. Select Tables.
  3. Find sys_db_view and sys_upgrade_history.
  4. Controls: Open the Controls tab.
  5. Create access controls: Enable the checkbox.
  6. User role: Choose u_database_view_user for both tables.