Tableau Connector for ServiceNow

Build 20.0.7711

ヘッドレスマシン

Using OAuth on a Headless Machine

The following sections show how to authenticate a headless server or another machine on which the connector cannot open a browser. You can authenticate with a user account or with a service account.
Note: Authenticating with the OAuth Password grant on a headless machine is the same process as explained in カスタムクレデンシャル

Authenticate with a User Account

To authenticate with a user account, you need to authenticate from another machine. Authentication is a two-step process.
  1. Instead of installing the connector on another machine, you can follow the steps below to obtain the OAuthVerifier value. Or, you can install the connector on another machine and transfer the OAuth authentication values, after you authenticate through the usual browser-based flow.
  2. You can then configure the connector to automatically refresh the access token from the headless machine.
You can follow the headless OAuth authentication flow using the connector's embedded OAuth credentials or using the OAuth credentials for your custom OAuth app.

Obtain a Verifier Code

Set the following properties on the headless machine:

  • OAuthGrantType: Set this to CODE.
  • InitiateOAuth: Set this to OFF.
  • OAuthClientId: Set this to the Client Id in your app settings.
  • OAuthClientSecret: Set this to the Client Secret in your app settings.
  • Instance: Set this to the ServiceNow instance.

You can then follow the steps below to authenticate from another machine and obtain the OAuthVerifier connection property.

  1. Call the GetOAuthAuthorizationURL stored procedure with the CallbackURL input parameter set to the exact Redirect URI you specified in your app settings.
  2. Open the returned URL in a browser. Log in and grant permissions to the connector. You are then redirected to the callback URL, which contains the verifier code.
  3. Save the value of the verifier code. You will set this in the OAuthVerifier connection property.

On the headless machine, set the following connection properties to obtain the OAuth authentication values:

  • OAuthVerifier: Set this to the verifier code.
  • OAuthSettingsLocation: Set this to persist the encrypted OAuth authentication values to the specified file.
  • InitiateOAuth: Set this to REFRESH.
  • OAuthGrantType: Set this to CODE.
  • Instance: Set this to the ServiceNow instance.

After the OAuth settings file is generated, set the following properties to connect to data:

  • OAuthSettingsLocation: Set this to the file containing the encrypted OAuth authentication values. Make sure this file gives read and write permissions to the provider to enable the automatic refreshing of the access token.
  • InitiateOAuth: Set this to REFRESH.
  • OAuthGrantType: Set this to CODE.
  • Instance: Set this to the ServiceNow instance.

Transfer OAuth Settings

Follow the steps below to install the connector on another machine, authenticate, and then transfer the resulting OAuth values.

On a second machine, install the connector and connect with the following properties set:

  • OAuthSettingsLocation: Set this to a writable text file.
  • InitiateOAuth: Set this to GETANDREFRESH.
  • OAuthClientId: Set this to the client Id assigned when you registered your app.
  • OAuthClientSecret: Set this to the client secret assigned when you registered your app.
  • CallbackURL: Set this to the Redirect URL in your app settings.
  • Instance: Set this to the ServiceNow instance.
  • OAuthGrantType: Set this to CODE.

Test the connection to authenticate. The resulting authentication values are written, encrypted, to the path specified by OAuthSettingsLocation. Once you have successfully tested the connection, copy the OAuth settings file to your headless machine. On the headless machine, set the following connection properties to connect to data:

  • InitiateOAuth: Set this to REFRESH.
  • OAuthSettingsLocation: Set this to the path to your OAuth settings file. Make sure this file gives read and write permissions to the connector to enable the automatic refreshing of the access token.
  • Instance: Set this to the ServiceNow instance.
  • OAuthGrantType: Set this to CODE.

Copyright (c) 2021 CData Software, Inc. - All rights reserved.
Build 20.0.7711