Excel Add-In for ServiceNow

Build 25.0.9434

接続の確立

接続プロファイルの設定

[CData]リボンから[データの取得]をクリックし、[取得元:ServiceNow]> 設定済みの接続 を選択してCData クエリウィンドウを起動します。新しい接続を設定するには、[新しいServiceNow 接続]をクリックします。ここでは、接続の設定、接続のテスト、および接続プロファイルの保存を行うことができます。

Connecting to ServiceNow

Prerequisite: All connections require the URL property. (ServiceNow instance URL).

For an authenticating user to connect to ServiceNow they need at least Read permissions to access listing metadata such as:

  • sys_db_object (required for all data)
  • sys_dictionary (required to retrieve ServiceNow schema information)
  • sys_glide_object (required for certain ServiceNow table metadata)

Use a least-privilege pattern: create a dedicated read-only role (for example, x_connector_metadata_reader) and require it on the ACLs below.

To create these ACLs, an admin must temporarily elevate their own session:

  1. In the user menu, click Elevate role.
  2. Check security_admin and click Update.

READ sys_db_object

Requires row-level and field-level permissions. To enable access to sys_db_object:

  1. Navigate to System Security > Access Controls (ACL).
  2. To create a new access control (ACL) object, select New.
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Table [sys_db_object] in the first drop-down and --None-- in the second drop-down. (Table-level read)
    • In the Requires role section, double-click the Insert a new row... text box. Search for and select your custom role (for example, x_connector_metadata_reader).
  3. Click Submit to create the ACL object.
  4. Create a second ACL for field-level read on all fields of sys_db_object:
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Table [sys_db_object] in the first drop-down and * in the second drop-down (that is, sys_db_object.*).
    • In the Requires role section, add the same custom role.

READ sys_dictionary

Requires row-level and field-level permissions. To enable access to sys_dictionary:

  1. Navigate to System Security > Access Controls (ACL).
  2. To create a new access control (ACL) object, select New.
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Table [sys_dictionary] in the first drop-down and --None-- in the second drop-down. (Table-level read)
    • In the Requires role section, double-click the Insert a new row... text box. Search for and select your custom role (for example, x_connector_metadata_reader).
  3. Click Submit to create the ACL object.
  4. Create a second ACL for field-level read on all fields of sys_dictionary:
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Table [sys_dictionary] in the first drop-down and * in the second drop-down (that is, sys_dictionary.*).
    • In the Requires role section, add the same custom role.

READ sys_glide_object

Requires row-level and field-level permissions. To enable access to sys_glide_object:

  1. Navigate to System Security > Access Controls (ACL).
  2. To create a new access control (ACL) object, select New.
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Field class [sys_glide_object] in the first drop-down and --None-- in the second drop-down. (Table-level read)
    • In the Requires role section, double-click the Insert a new row... text box. Search for and select your custom role (for example, x_connector_metadata_reader).
  3. Click Submit to create the ACL object.
  4. Create a second ACL for field-level read on all fields of sys_glide_object:
    • For Type, select record.
    • For Operation, select read.
    • For Name, select Field class [sys_glide_object] in the first drop-down and * in the second drop-down (that is, sys_glide_object.*).
    • In the Requires role section, add the same custom role.

Notes:

  • If your configuration enables database views (for example, using an IncludeDatabaseViews property), create the same pair of read ACLs for sys_db_view, sys_db_view_table, and sys_db_view_table_field.
  • If you surface descriptions or display column names (for example, using ShowDescriptions or UseDisplayColumnNames), create the same pair of read ACLs for sys_documentation.
  • The API and the UI enforce the same security. Users must pass both table-level and field-level ACLs on each target business table to read or write records. If either ACL fails, access is denied.
  • Inherited tables: many application tables extend a parent (for example, incident extends task). Inherited fields are governed by the parent’s ACLs. Ensure the user’s roles satisfy ACLs on the child and any parents.
  • Business tables (e.g., incident) require their own roles/ACLs; metadata ACLs alone do not grant business data access.

Final step (perform once after creating all ACLs above):

  1. Navigate to User Administration > Users > Select authenticating user > Roles > Edit....
  2. Add the custom role you required on the ACLs (for example, x_connector_metadata_reader) to the authenticating user.

Authenticating to ServiceNow

ServiceNow supports Basic authentication, authentication via the OAuth standard, authentication via the PASSWORD grant type, and authentication via an SSO provider.

Basic

To use Basic authentication, you must provide your ServiceNow User and Password.

After setting the following connection properties, you are ready to connect:

  1. AuthScheme: BASIC.
  2. User: The BASIC user.
  3. Password: The BASIC user's password.
  4. URL: The base URL of the ServiceNow instance site. For example: https://MyInstance12345.service-now.com/.

OAuth

ServiceNow supports OAuth authentication for all situations where the user is not logging in via SSO and not using Basic authentication. To enable this authentication from all OAuth flows, you must set AuthScheme to OAuth, and you must create a custom OAuth application. In addition to these OAuth values, you must also specify the URL, User, and Password.

The following subsections describe how to authenticate to ServiceNow from three common authentication flows. For information about how to create a custom OAuth application, see カスタムOAuth アプリケーションの作成.

For a complete list of connection string properties available in ServiceNow, see Connection.

Desktop Applications

To authenticate with the credentials for a custom OAuth application, you must get and refresh the OAuth access token. After you do that, you are ready to connect.

Get and refresh the OAuth access token:

When you connect, the 本製品 opens ServiceNow's OAuth endpoint in your default browser. Log in and grant permissions to the application.

When the access token expires, the 本製品 refreshes it automatically.

Automatic refresh of the OAuth access token:

To have the 本製品 automatically refresh the OAuth access token, do the following:

  1. Before connecting to data for the first time, set the following connection parameters:
  2. On subsequent data connections, set the following:

Manual refresh of the OAuth access token:

The only value needed to manually refresh the OAuth access token is the OAuth refresh token.

  1. To manually refresh the OAuthAccessToken after the ExpiresIn period (returned by GetOAuthAccessToken) has elapsed, call the RefreshOAuthAccessToken stored procedure.
  2. Set the following connection properties:

  3. Call RefreshOAuthAccessToken with OAuthRefreshToken set to the OAuth refresh token returned by GetOAuthAccessToken.
  4. After the new tokens have been retrieved, set the OAuthAccessToken property to the value returned by RefreshOAuthAccessToken. This opens a new connection.

Store the OAuth refresh token so that you can use it to manually refresh the OAuth access token after it has expired.

PASSWORD Grant Type

ユーザーとアプリケーションの間に信頼関係がある場合、ユーザーはPASSWORD グラントタイプを使用して、デスクトップまたはWeb から認証できます。

PASSWORD グラントタイプを介して認証するには、次のプロパティを設定します。

接続すると、本製品 はOAuth 処理を完了します。

  1. CallbackURL からアクセストークンを取得します。
  2. 古いトークンの期限が切れたときは、新しいアクセストークンを取得します。
  3. OAuthSettingsLocation に地理位置情報とともにOAuth 値を保存し、接続間で永続化されるようにします。

Single Sign-On Identity Providers

ServiceNow supports single sign-on (SSO) authentication through ADFS, Okta, OneLogin, and PingFederate.

ADFS

ADFS に接続するには、AuthSchemeADFS に設定し、次のプロパティを設定します。

  • User:ADFS ユーザー。
  • Password:ADFS ユーザーのパスワード。
  • SSOLoginURL:SSO プロバイダーのログインURL。

ADFS への認証を行うには、次のSSOProperties を設定します。

  • RelyingParty:ADFS サーバーのRelying Party Identifier の値。

接続文字列の例:

AuthScheme=ADFS;User=username;Password=password;SSOLoginURL='https://sts.company.com';SSOProperties='RelyingParty=https://saml.service-now.com';Url=https://MyInstance12345.service-now.com/;

ADFS 統合

ADFS 統合フローでは、現在ログインしているWindows ユーザーの資格情報で接続します。 ADFS 統合フローを使用するには、User およびPassword を指定せず、それ以外の設定は上記のADFS ガイドと同じ手順を実行してください。

Okta

Okta に接続するには、AuthSchemeOkta に設定し、次のプロパティを設定します。

  • User:Okta ユーザー。
  • Password:Okta ユーザーのパスワード。
  • SSOLoginURL:SSO プロバイダーのログインURL。

Okta クライアントリクエストコンテキストをオーバーライドする信頼されたアプリケーションまたはプロキシを使用する場合、またはMFA を設定している場合は、Okta を使用して認証するためにSSOProperties を組み合わせて使用する必要があります。必要に応じて、以下のいずれかを設定します。

  • APIToken:Okta クライアントリクエストコンテキストをオーバーライドする、信頼されたアプリケーションまたはプロキシ経由でユーザーを認証する場合、これを顧客がOkta 組織で作成したAPI Token に設定します。
  • MFAType:MFA フローを設定した場合、次の対応するタイプのいずれかに設定します:OktaVerifyEmail、またはSMS
  • MFAPassCode:MFA フローを設定した場合は、有効なパスコードに設定します。
    これを空欄または無効な値に設定した場合、本製品 はユーザーのデバイスまたはE メールにワンタイムパスワードチャレンジを発行します。パスコードを受信後、取得したワンタイムパスワードをMFAPassCode 接続プロパティに設定する接続を再度開きます。
  • MFARememberDevice:デフォルトはTrue です。Okta は、MFA が必要な場合にデバイスを記憶させることをサポートします。設定された認証ポリシーに従ってデバイスの記憶が許可されている場合、本製品 はMFA 認証の有効期間を延長するデバイストークンを送信します。MFA を記憶させない場合は、この 変数をFalse に設定してください。

接続文字列の例:

AuthScheme=Okta;SSOLoginURL='https://example.okta.com/home/appType/0bg4ivz6cJRZgCz5d6/46';User=oktaUserName;Password=oktaPassword;Url=https://MyInstance12345.service-now.com/;

OneLogin

OneLogin に接続するには、AuthSchemeOneLogin に設定し、次のプロパティを設定します。

  • User:OneLogin ユーザー。
  • Password:OneLogin ユーザーのパスワード。

OneLogin への認証を行うには、次のSSOProperties を設定します。

  • OAuthClientId:Developers -> API Credentials -> Credential -> ClientId を選択して取得できるOAuthClientId。
  • OAuthClientSecret:Developers -> API Credentials -> Credential -> ClientSecret を選択して取得できるOAuthClientSecret。
  • Subdomain:SSO アプリケーションにアクセスするOneLogin ユーザーのサブドメイン。例えば、OneLogin URL がsplinkly.onelogin.com の場合、splinkly がサブドメインの値です。
  • AppId:SSO アプリケーションのId。
  • リージョン(オプション):OneLogin アカウントで使用しているリージョン。有効な値はUS(デフォルト)またはEU です。

次の例の接続文字列はOneLogin への接続にAPI Key を使います:

AuthScheme=OneLogin;User=OneLoginUserName;Password=OneLoginPassword;SSOProperties='OAuthClientID=3fc8394584f153ce3b7924d9cd4f686443a52b;OAuthClientSecret=ca9257fd5cc3277abb5818cea28c06fe9b3b285d73d06;Subdomain=OneLoginSubDomain;AppId=1433920';Url=https://MyInstance12345.service-now.com/;

PingFederate

PingFederate に接続するには、AuthSchemePingFederate に設定し、次のプロパティを設定します。

  • User:PingFederate ユーザー。
  • Password:PingFederate ユーザーのパスワード。
  • SSOLoginURL:SSO プロバイダーのログインURL。
  • AWSRoleARN(オプション):複数のロールARN がある場合は、認可に使用するARN を指定します。
  • AWSPrincipalARN(オプション):複数のプリンシパルARN がある場合は、認可に使用するARN を指定します。
  • SSOProperties(オプション):Amazon S3へのリクエストにユーザー名とパスワードを認可ヘッダーとして含める場合は、Authscheme=Basic

SSOLoginURL 用の相互SSL 認証(WS-Trust STS エンドポイント)を有効化するには、次の SSOProperties を設定します。

接続文字列の例:

AuthScheme=PingFederate;URL='https://dev103586.service-now.com';SSOLoginUrl='https://mycustomserver.com:9033/idp/sts.wst';User=admin;Password=PassValue123;

接続プロパティ

最後に、Connection プロパティを参照してください。接続の確立に使用できるさまざまなオプションの説明があります。

接続の管理

ServiceNow への認証に成功すると、インポートするデータをカスタマイズすることができます。詳しくは、接続の管理 を参照してください。

関連項目

  • データのクエリ:[データ選択]ウィザードを使用してスプレッドシートにデータをプルします。また、ここではスケジュールされたデータのリフレッシュも設定できます。
  • Excel アドインの使用:利用可能なCData Excel 関数 を使用するなど、ServiceNow データとやり取りする他の方法が見つかります。

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9434