Configuring OAuth at ServiceNow

Using OAuth, you can pass a user ID and password once, and then use a token for subsequent REST requests instead of submitting credentials with each request

  1. Log in to the ServiceNow instance.
  2. Activate the OAuth 2.0 plugin.
  3. In the sys_properties table, set the system property com.snc.platform.security.oauth.is.active to true.
  4. Click system OAuth > Application Registry.
  5. Click NEW and then click an OAuth API endpoint for external clients.
  6. Specify the following parameters:
    Name
    Enter a unique name.
    Client ID
    Client ID automatically generated by ServiceNow OAuth server.
    Client secret Key
    Client secret for the OAuth application.
    Refresh Token Lifespan
    Time in seconds the refresh token is valid.
    Access Token Lifespan
    Time in seconds the access token is valid.
  7. Record the value of client ID and client Secret from the previous step.
  8. Click Submit.
    Note: OAuth configuration is not mandatory to establish connection with ServiceNow. OAuth Configuration is required only for token-based login, otherwise ServiceNow credentials are used to establish the connection.