# SCIMプッシュ配信設定

## すべてのソースに共通

前提条件: [ユーザーとチームのプロビジョニング](/enterprise-guide/jp/user-and-team-provisioning.md)について理解しておいてください

1. 管理コンソールまたはCommanderを使用して、企業のSCIMプロビジョニングを作成します
2. `login`記録タイプの記録をKeeperに作成し、SCIM設定を保存します
3. SCIM URLを設定の記録の`Web Address`フィールドに貼り付けます
4. SCIMトークンを`Password`フィールドに貼り付けます

## Google Workspace

このセクションの設定手順で、Google Workspaceアカウントからユーザーとチームをプロビジョニングできます。

前提条件: [有効なGoogle Workspace](https://admin.google.com)サブスクリプションと[Google Cloud Platform](https://console.cloud.google.com/)アカウント

`pip`でインストールされたCommander: Google API Client Pythonパッケージがインストールされているようにします

<pre class="language-bash"><code class="lang-bash"><strong>(keeper) % pip install google-api-python-client
</strong></code></pre>

1. [Google Cloud Platform](https://console.cloud.google.com/):プロジェクトを作成するか、または既存のプロジェクトを選択します
2. [Google Cloud Platform](https://console.cloud.google.com/):プロジェクトで`Admin SDK API`を有効にします
   * `APIs & Services`で`+ENABLE APIS AND SERVICES`をクリックします
   * `Search for APIs & Services`で`Admin SDK API`と入力します
   * `ENABLE`をクリックします
3. [Google Cloud Platform](https://console.cloud.google.com/):サービスアカウントを作成します
   * `IAM and Admin`メニューで`Service accounts`を選択します
   * `+CREATE SERVICE ACCOUNT`をクリックします。推奨されるサービスアカウント名: `keeper-scim`
   * サービスアカウントを新規作成した場合は、`Actions`/dotsをクリックして、`Manage Keys`を選択します
   * `ADD KEYS` -> `Create New Key`の順にクリックします。JSONキータイプを選択してから`CREATE`を選択します
   * サービスアカウントのクレデンシャルを含むJSONファイルがコンピュータにダウンロードされます
   * このファイルの名前を`credentials.json`に変更し、このファイルを添付ファイルとして設定の記録に追加します
4. サービスアカウントにGoogle Workspaceディレクトリへのアクセスを許可します
   * [Google Cloud Platform](https://console.cloud.google.com/)
     * サービスアカウントに移動し、`DETAILS`タブを選択します
     * `Domain-wide delegation`セクションで、`Client ID`をコピーします。このClientIDにGoogle Workspaceディレクトリへのアクセスを許可する必要があります
   * [Google Workspace管理コンソール](https://admin.google.com/)
     * `Security` -> `API controls`に移動します
     * `Domain wide delegation`の下の`MANAGE DOMAIN WIDE DELEGATION`をクリックします
     * `API Clients`の`Add new`をクリックします
     * `Client ID`を貼り付けます
     * 次のテキストを`OAuth scopes (comma-delimited)`に貼り付けます<mark style="color:yellow;">`https://www.googleapis.com/auth/admin.directory.group.readonly,https://www.googleapis.com/auth/admin.directory.group.member.readonly,https://www.googleapis.com/auth/admin.directory.user.readonly`</mark>
     * `AUTHORIZE`をクリックします (これらのスコープが、サービスアカウントにGoogle Workspaceディレクトリのユーザー、グループ、メンバーシップへの読み取り専用アクセスを付与します）
5. [Google Workspace管理コンソール](https://admin.google.com/): `Service Account`を持つプロバイダーのKeeper
   * Googleで、`Account` -> `Account settings`に移動します
   * `Primary admin`のメールアドレスをクリップボード (右上) にコピーします
   * このメールアドレスをKeeperのGoogle SCIM設定記録のログインフィールドに貼り付けます
6. [Google Workspace管理コンソール](https://admin.google.com/): Keeperにエクスポートするユーザーを格納するグループを作成します。
   * オプション: 全ユーザーアカウントをインポートする場合は、この手順を省略します
   * `Directory` -> `Group`に移動します
   * `Create group`をクリックします
   * Keeperにプロビジョンする必要があるユーザーをすべてこのグループに割り当てます

Keeper側のGoogle SCIM設定記録には以下のフィールドが含まれているはずです。

<table><thead><tr><th width="260.4857849196539">フィールド</th><th width="126.33333333333331">セクション</th><th>値</th></tr></thead><tbody><tr><td>Login (ログイン)</td><td>Google #5</td><td>Google Workspace管理者メール</td></tr><tr><td>Password (パスワード)</td><td>Common #4</td><td>管理コンソールで生成されたSCIMトークン</td></tr><tr><td>Website Address (ウェブサイトのアドレス)</td><td>Common #3</td><td>管理コンソールから貼り付けられたSCIM URL</td></tr><tr><td>SCIM Group (SCIMグループ)</td><td>Google #6</td><td>すべてのユーザーをインポートするGoogleグループ名または空白</td></tr><tr><td>credentials.json</td><td>Google #3</td><td>サービスアカウントのクレデンシャルを含むファイル添付</td></tr></tbody></table>

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2FO8t9V9UHuDYj7vi6BrB8%2Fimage.png?alt=media&#x26;token=5d1b681d-32b3-455e-8d25-9b68baa80c60" alt=""><figcaption><p>Google Cloudサービスアカウント情報を含むKeeperの記録</p></figcaption></figure>

### プロビジョニングデータをプッシュ

GoogleユーザーとチームをKeeperにプッシュするには、以下のコマンドを使用します。

```
scim push <SCIM ID> --source=google --record=<RECORD UID>
```

SCIM IDは、管理コンソールかCommanderを使用して確認できます。

例:

```
My Vault> scim list
        SCIM ID  Node Name              Node ID          Status   Last Synced
---------------  ---------------------  ---------------  -------  ------------
288797895952358  Lurey, Inc.\Corporate  288797895950343  active   Wed Jul  6 09:44:44 2022
288797895951707  Lurey, Inc.\Azure      288797895951061  active   Fri Jul  7 14:25:31 2023
288797895951110  Lurey, Inc.\Google     288797895951063  active   Mon May 30 23:42:52 2022
```

### Google Workspaceの自動プロビジョニング

Google Workspaceユーザーとチームのプロビジョニングを自動的に実行するGoogle Cloud Functionを作成しました。詳細については、[こちら](/sso-connect-cloud/jp/identity-provider-setup/g-suite-keeper/google-workspace-user-and-group-provisioning-with-cloud-function.md)をご参照ください。

## Active Directory

こちらのセットアップ手順では、`scim push`コマンドを使用してActive Directoryからユーザーとチームをプロビジョニングします。

前提条件:

1. Active Directoryのブラウザでグループを作成し、KeeperでプロビジョニングするADユーザーとグループを追加します
2. `ldap(s):<ドメインコントローラーホストまたはIP>`のような、Active Directory接続URLを取得します
3. Active Directoryを読み取ることができるユーザーを選択します

Keeper側のActive Directory設定記録には、以下のフィールドが含まれているはずです。

<table><thead><tr><th width="174">フィールド</th><th width="128.33333333333331">セクション</th><th>値</th></tr></thead><tbody><tr><td>Password</td><td>Common #4</td><td>Keeper管理コンソールで生成されたSCIMトークン</td></tr><tr><td>Website Address</td><td>Common #3</td><td>Keeper管理コンソールから貼り付けたSCIM URL</td></tr><tr><td>SCIM Group</td><td>AD # 1</td><td>インポートする全ユーザーとグループが記載されたADグループ名</td></tr><tr><td>AD URL</td><td>AD #2</td><td><p>AD接続URL</p><p><code>ldap(s)://&#x3C;ドメインコントローラー></code></p></td></tr><tr><td>AD User</td><td>AD #3</td><td>ADユーザーログインまたは識別名<br><code>DOMAIN\USERNAME</code><br><code>CN=...</code></td></tr><tr><td>AD Password</td><td>AD #3</td><td>ADパスワード</td></tr></tbody></table>

### プロビジョニングデータのプッシュ

Active DirectoryのユーザーとチームをKeeperにプッシュするには、以下のコマンドを使用します。

```
scim push <SCIM ID> --source=ad --record=<RECORD UID>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands/scim-push-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
