Application Configuration in ServiceNow Portal for OAuth2 Account to use in ServiceNow

In this article

Overview

Snaps in the ServiceNow Snap Pack use the ServiceNow OAuth2 account to access the ServiceNow application. For the OAuth2 account to function without any issues, ensure to create and configure a Connected App corresponding to the account, as explained in the steps below. These steps also contain the information required to create/define a new OAuth2 account for using this Snap Pack.

Create an OAuth app in ServiceNow

  1. Create an instance in the ServiceNow portal.

  2. Log into your instance in ServiceNow.

  3. In the left navigation pane, type OAuth in the Filter box.

  4. Click Application Registry, and then click New.

    OAuth_Filter.png
  5. Select Create an OAuth API endpoint for external clients.

    The app configuration form is displayed in the right pane.

  6. Enter the Name for your application.

  7. To allow your app to remain active, leave the Active checkbox selected.

  8. Enter the time (in seconds) to indicate the lifetime of the Refresh and Access tokens.
    By default, the Access token is valid for 30 minutes and the Refresh token is valid for 100 days.

  9. Enter the Redirect URL in the following format:
    https://<control-plane-name>.snaplogic.com/api/1/rest/admin/oauth2callback/<snap-pack-name>
    where the <control-plane-name> corresponds to the domain part of your SnapLogic URL—elastic (global control plane) or emea (EMEA control plane).
    For example:
    https://elastic.snaplogic.com/api/1/rest/admin/oauth2callback/servicenow, https://emea.snaplogic.com/api/1/rest/admin/oauth2callback/servicenow
    You can provide multiple URLs, separating them with a comma as shown above.
    Note: To process the authorization of OAuth through the REST Snap pack, provide the following URL in this format:
    https://<control-plane-name>.snaplogic.com/api/1/rest/admin/oauth2callback/rest

  10. Optional. Provide Logon URL to upload an image for your app.

  11. Optional. Provide comments as required.

  12. Click Submit.
    The Client ID and Client Secret are auto-generated. The newly created OAuth2 app appears on the list.

Locate/Define Information Required to Create your ServiceNow OAuth2 Account

Specify the values required to create a successful ServiceNow OAuth2 account.

  1. Navigate to the ServiceNow Snap of your choice and configure the ServiceNow OAuth2 Account with the following details:

    • Client ID: A Public Identifier for your app. Provide the Client ID that is auto-generated after creating the app in your ServiceNow instance.

    • Client Secret: Secret value known only to the app and the auth server. Provide the Client Secret that is auto-generated after creating the app in your ServiceNow instance.

    • OAuth2 Endpoint: https://<servicenow instance name>.service-now.com/oauth_auth.do . For example, https://myinstance.service-now.com/oauth_auth.do

    • OAuth2 Tokenhttps://<servicenow instance name>.service-now.com/oauth_token.do . For example, https://myinstance.service-now.com/oauth_token.do

  2. Click Authorize.
    You will be redirected to the login page of ServiceNow.

  3. Log into ServiceNow and accept the permissions.
    The Access token and the Refresh Token will be generated.

  4. Select the Auto-refresh token checkbox and save the account.


Related Links