Configuring Authentication

To access ServiceNow data stores, you must authenticate the connection using the OAuth 2.0 protocol. You can do this by providing a valid access token or by providing your ServiceNow credentials so that the connector initiates an OAuth 2.0 authentication flow to retrieve and use the corresponding access token.

Using an Access Token

If you already have a valid access token, you can authenticate your connection by providing the token in the connection URL.

To authenticate using an access token:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:servicenow://;Host=[InstanceURL];Auth_Type=OAuth 2.0;Auth_AccessToken=[AccessToken]

    The variables are defined as follows:

  • [InstanceURL] is the URL of your ServiceNow instance.
  • [AccessToken] is your access token for authenticating to ServiceNow.

For example:

jdbc:servicenow://;Host=https://instance12345.service-now.com;Auth_Type=OAuth 2.0;Auth_AccessToken=kP9PcyQ7prK2LwUMZMpFQ4R+5VE

Using ServiceNow Credentials

You can configure the connector to retrieve and use an access token based on your ServiceNow credentials. To do this, in the connection URL, provide your ServiceNow user name and password as well as the client ID and secret associated with your ServiceNow app.

To authenticate using ServiceNow credentials:

  • Connect to the server using a connection URL written in the following format:
  • jdbc:servicenow://;Host=[InstanceURL];Auth_Type=OAuth 2.0;Auth_Client_ID=[ClientID];Auth_Client_Secret=[ClientSecret];UID=[UserName];PWD=[Password];TrustCertsPath=[Keystore];TrustCertsPwd=[SSLPassword]

    The variables are defined as follows:

  • [InstanceURL] is the URL of your ServiceNow instance.
  • [ClientID] is the client ID associated with your ServiceNow application.
  • [ClientSecret] is the client secret associated with your ServiceNow application.
  • [UserName] is the user name that you use to access ServiceNow.
  • [Password] is the password that you use to access ServiceNow.
  • [KeyStore] is the full path and name of the keystore that contains a password-protected SSL certificate used for proving the identity of the connector to the ServiceNow server.
  • [SSLPassword] is the password for decrypting the SSL certificate.

For example:

jdbc:servicenow://;Host=https://instance12345.service-now.com;Auth_Type=OAuth 2.0;Auth_Client_ID=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;Auth_Client_Secret=kP9PcyQ7prK2LwUMZMpFQ4R+5VE;UID=simba;PWD=simba123;TrustCertsPath=C:\\Users\\MyKeystore.p12;TrustCertsPwd=jsmith

The connector uses these settings to go through an OAuth 2.0 authentication flow and authenticate your connection to ServiceNow. For more information, see Security and Authentication.