---
sourceDocument: Xanadu のアプリケーションとの統合の作成
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/ja-JP/xanadu/integrate-applications

 Release :

    - xanadu

ft:locale :

    - ja-JP

ft:publication_title :

    - Xanadu のアプリケーションとの統合の作成

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# Google Cloud FunctionsSpoke を設定

# Google Cloud FunctionsSpoke を設定 {#ariaid-title1}

* リリースバージョン: Xanadu
* 
* 更新日 2024年08月01日
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 所要時間：4分

Google Cloud Platformにカスタム OAuth アプリケーションを作成してServiceNowインスタンスと Google Cloud Functionsアカウントをデータ連携し、ServiceNow要求を認証します。

## 始める前に

* 統合ハブ サブスクリプションの要求。
* Google Cloud Functions スポークの有効化。
* 必要なロール：admin
{#gcloud-func-setup__ul_agy_qxd_rlb}

## Google Cloud Functions アプリケーションの構成 {#ariaid-title2}

Google Cloud Platform アカウントでカスタム OAuth アプリケーションを作成し、 Google Cloud Functions スポークで OAuth 2.0 認証を有効にします。

### このタスクについて

[Google Cloud Platform](https://cloud.google.com/) から次の手順を実行します。カスタムアプリケーションを作成および構成する方法については、[Google Cloud Platform](https://cloud.google.com/docs) の製品ドキュメントを参照してください。

### 手順

1. \[ <https://console.cloud.google.com/> \] に移動し、アドミニストレーターの認証情報でプロジェクトを作成して、新しいカスタムアプリケーションを登録します。
2. 新しいプロジェクトを開き、\[APIs \& Services\] メニューで \[OAuth consent screen\] を選択します。
3. アプリケーション名を入力し、 \[承認済みドメイン\] <kbd class="ph userinput">service-now.com</kbd> を指定して、 \[ 保存\] を選択します。
4. \[API とサービス (APIs \& Services) \] メニューから \[認証情報\] を選択し、 \[認証情報の作成 (Create credentials) \] リストから \[OAuth クライアント ID の作成 (Create OAuth client ID) \] を選択します。
5. アプリケーションタイプ \[OAuth クライアント ID\] を選択します。
6. 承認済みのリダイレクト URI「<kbd class="ph userinput">https://&lt;インスタンス&gt;.service-now.com/oauth_redirect.do</kbd>」を入力して、\[作成\] をクリックします。
7. クライアント ID とクライアントシークレットを OAuth クライアントウィンドウからテキストファイルにコピーして、 [OAuth プロバイダーとして Google Cloud Functionsを登録](https://servicenow-prod.fluidtopics.net/na~OIk6oynf~~83~i9oZ6g#reg-gcloud-func-oauth "Google Cloud Functionsアプリケーションの構成中に生成された情報を使用し、 Google Cloud Functionsを OAuth プロバイダーとして登録して、ServiceNowインスタンスが OAuth 2.0 トークンを要求できるようにします。")時に使用できるようにします。  
   クライアント ID とシークレットには、Google API と Services インターフェイスでアクセスできます。\[認証情報\] を選択し、OAuth 2.0 クライアント ID 名を選択します。
{#conf-gcloud-fun__steps_tdj_yxk_rhb}

## OAuth プロバイダーとして Google Cloud Functionsを登録 {#ariaid-title3}

Google Cloud Functionsアプリケーションの構成中に生成された情報を使用し、 Google Cloud Functionsを OAuth プロバイダーとして登録して、ServiceNowインスタンスが OAuth 2.0 トークンを要求できるようにします。

### 始める前に

必要なロール：admin

### 手順

1. 移動先 すべてシステム OAuthアプリケーションレジストリ.
2. レコード、Google Cloud Functions を開きます。
3. フォームに、これらの値を入力します。  
   {#reg-gcloud-func-oauth__table_qxt_fqx_4mb__entry__2}

   | フィールド | 説明 |
   |-|-|
   | クライアント ID | Google Cloud Functions アプリケーションのクライアント ID です。 |
   | クライアントシークレット | Google Cloud Functions アプリケーションのクライアントシークレットです。 |
   | OAuth API スクリプト | デフォルトで \[OauthGoogleCloudFunctionsUtils\] が選択されています。 |
   | 認証 URL | OAuth 認証コードエンドポイント：<kbd class="ph userinput">https://accounts.google.com/o/oauth2/auth</kbd> |
   | トークン URL | OAuth サーバートークンエンドポイント：<kbd class="ph userinput">https://oauth2.googleapis.com/token</kbd> |
   | リダイレクト URL | 次の形式で OAuth コールバックエンドポイントを入力します：<kbd class="ph userinput">https://&lt;instance&gt;.service-now.com/oauth_redirect.do</kbd> 空白のままにすると、インスタンスは URL を自動生成します。 |
   [表 : 1. アプリケーションレジストリフォーム]

   {#reg-gcloud-func-oauth__table_qxt_fqx_4mb}
4. フォームヘッダーを右クリックし、\[保存\] をクリックします。
{#reg-gcloud-func-oauth__steps_nd3_bmy_4mb}

## Google Cloud Functions スポークの認証情報レコードを作成 {#ariaid-title4}

Google Cloud Functionsアプリケーションの認証情報レコードを作成します。 Google Cloud Functionsスポーク接続および資格情報エイリアスでは、これらの認証情報を使用してアクションを許可します。

### 始める前に

必要なロール：admin。

### 手順

1. 移動先 すべて統合ハブ接続 \& 認証情報.
2. レコード \[GoogleCloudFunctions\] を開きます。
3. \[認証情報\] タブで、\[新規\] をクリックします。  
   「作成する認証情報のタイプは？」というメッセージが表示されます。
4. \[OAuth 2.0 認証情報\] を選択します。
5. フォームに、これらの値を入力します。  
   {#create-cred-gcloud-func__table_v32_ks2_q1c__entry__2}

   | フィールド | 説明 |
   |-|-|
   | 名前 | 認証情報レコードを識別する名前です。例：<kbd class="ph userinput">Google Cloud Functions Cred</kbd> |
   | OAuth エンティティプロファイル | デフォルトの OAuth エンティティプロファイル \[Google Cloud Functions default_profile\] を選択します。 |
   | 認証情報エイリアス | このレコードに関連付けられた認証情報エイリアス。デフォルトのエイリアスレコード \[sn_gcp_cf_spoke.GoogleCloudFunctions\] が選択されます。 |
   [表 : 2. OAuth 2.0 認証情報フォーム]

   {#create-cred-gcloud-func__table_v32_ks2_q1c}

6. フォームヘッダーを右クリックし、 \[保存\] をクリックします。
7. OAuth トークンを生成するには、\[OAuth トークンの 取得\] 関連リンクをクリックします。
{#create-cred-gcloud-func__steps_g5v_clf_q1c}

