> ## Documentation Index
> Fetch the complete documentation index at: https://docs.iru.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Workspace とのユーザーディレクトリ連携

> Google Workspace を Iru Endpoint に接続して、ユーザーとグループを同期します。Google のサインイン、権限、ディレクトリのセットアップを完了します。

### Google Workspace とのユーザーディレクトリ連携

Iru Endpoint の Google Workspace 連携は、Google Workspace のユーザーオブジェクトとグループオブジェクトを Iru Endpoint のユーザーディレクトリに同期します。Iru Endpoint は、Google API を通じてこれらの委任された権限を使用し、そのディレクトリ情報を同期します。ディレクトリ連携が重要な理由、マーケットプレイスのフィルター、同期、再認証、削除については、[ユーザーディレクトリ連携の概要とプロバイダー](/ja/endpoint/integrations/directory-services/user-directory-integration)を参照してください。

### Google Workspace 連携を追加する

<Steps>
  <Step title="インテグレーションを開く">
    サイドバーで [**アカウントメニューボタン**](/ja/iru/platform-overview/account-menu) を選択し、**インテグレーション** を選択します。

    <Frame>
      <img src="https://mintcdn.com/iru/8BYPjuKZa-zyEEf_/assets/media/images/iru-nav-integrations.png?fit=max&auto=format&n=8BYPjuKZa-zyEEf_&q=85&s=e89fa7e9b81ac504a6f519608e10b8a3" alt="Integrations オプションが強調表示されたアカウントメニューのスクリーンショット" width="562" height="1040" data-path="assets/media/images/iru-nav-integrations.png" />
    </Frame>
  </Step>

  <Step title="すべての連携を参照する">
    Integrations ページの右上にある **すべてのインテグレーションを参照** を選択します。
  </Step>

  <Step title="Google Workspace を選択する">
    **Google Workspace** タイルを選択します。
  </Step>

  <Step title="セットアップを開始する">
    **Get Started** を選択します。
  </Step>

  <Step title="連携名を入力する">
    一意の名前を入力します。この名前は、ユーザーの取得元ディレクトリを示すために Iru Endpoint で使用されます。
  </Step>

  <Step title="Google でサインインする">
    **Sign in with Google** を選択します。
  </Step>

  <Step title="認証を完了する">
    連携するディレクトリへの管理者アクセス権を持つ Google アカウントでサインインします。
  </Step>

  <Step title="アカウントの権限を確認する">
    Iru Endpoint が要求する基本的なアカウント情報を確認し、**続ける** を選択します。

    <Note>
      Google でアクセスを許可する際、Google ではこのアプリの名前が引き続き **Kandji** <img className="inline dark:hidden" src="https://mintcdn.com/iru/20OhJ3wZmF4DKbOd/assets/media/images/kandji-bee-light-icon.png?fit=max&auto=format&n=20OhJ3wZmF4DKbOd&q=85&s=3ac73eb9098c090ac2838a4902a70e35" alt="" style={{ height: '1em', width: 'auto', maxHeight: '1em', verticalAlign: '-0.125em', margin: '0 0.05em' }} width="400" height="284" data-path="assets/media/images/kandji-bee-light-icon.png" /><img className="hidden dark:inline" src="https://mintcdn.com/iru/20OhJ3wZmF4DKbOd/assets/media/images/kandji-bee-dark-icon.png?fit=max&auto=format&n=20OhJ3wZmF4DKbOd&q=85&s=1d4b643c8e1903aabdb072fdf211f2de" alt="" style={{ height: '1em', width: 'auto', maxHeight: '1em', verticalAlign: '-0.125em', margin: '0 0.05em' }} width="400" height="284" data-path="assets/media/images/kandji-bee-dark-icon.png" /> と表示されます。**Kandji** アプリを許可して、Google Workspace ディレクトリを Iru Endpoint に接続してください。
    </Note>

    <Frame>
      <img src="https://mintcdn.com/iru/HIaOdLmBHtAWalH0/assets/media/images/iru-google-directory-sign-in.png?fit=max&auto=format&n=HIaOdLmBHtAWalH0&q=85&s=825f25759f2648293f647e6c3fcfa1ba" alt="名前、プロフィール写真、メールアドレスを要求し、Continue が強調表示された Google の Kandji へのサインイン画面" width="1080" height="625" data-path="assets/media/images/iru-google-directory-sign-in.png" />
    </Frame>
  </Step>

  <Step title="すべての権限を選択する">
    権限の画面で、**Select all** のチェックボックスをオンにします。

    <Note>
      [連携を再認証する](/ja/endpoint/integrations/directory-services/user-directory-integration#re-authenticate-a-directory-integration)際は、再度 **Select all** を選択してから **続ける** を選択してください。再認証では、これらの権限を再度付与しない限り、ユーザーとグループへのアクセスは復元されません。
    </Note>
  </Step>

  <Step title="ユーザーとグループへのアクセスを許可する">
    **View groups on your domain** と **See info about users on your domain** が選択されていることを確認し、**続ける** を選択します。

    <Frame>
      <img src="https://mintcdn.com/iru/HIaOdLmBHtAWalH0/assets/media/images/iru-google-directory-grant-user-and-group-access.png?fit=max&auto=format&n=HIaOdLmBHtAWalH0&q=85&s=0e99bc87005fc0c2129c1c6649c1c989" alt="Select all、View groups on your domain、See info about users on your domain が選択され、Continue が強調表示された Google のアクセス画面" width="1072" height="710" data-path="assets/media/images/iru-google-directory-grant-user-and-group-access.png" />
    </Frame>

    <Note>
      ドメインのグループの表示とドメインのユーザー情報の参照を Iru Endpoint に許可せずに続行すると、連携は正常に接続されますが、ユーザーとグループは正しく同期されません。これを修正するには、[連携を再認証](/ja/endpoint/integrations/directory-services/user-directory-integration#re-authenticate-a-directory-integration)し、要求されたすべての権限を付与してください。
    </Note>
  </Step>

  <Step title="連携を確認する">
    **インテグレーション** ページに新しいユーザーディレクトリが表示されます。
  </Step>
</Steps>

連携が接続されたら、[追加情報の表示](/ja/endpoint/integrations/directory-services/user-directory-integration#view-additional-information-about-a-directory-integration)、[ユーザーディレクトリの強制同期](/ja/endpoint/integrations/directory-services/user-directory-integration#force-a-user-directory-sync)、[再認証](/ja/endpoint/integrations/directory-services/user-directory-integration#re-authenticate-a-directory-integration)、または[連携の削除](/ja/endpoint/integrations/directory-services/user-directory-integration#remove-a-directory-integration)を行うことができます。

### Google Workspace の権限

以下の権限は自動的に要求され、Google Workspace のユーザーを Iru Endpoint に正常に同期するために必要です。Google の管理者は、以下の権限を Iru Endpoint に委任するための十分な権限を持っている必要があります。

| 権限 | 表示テキスト | 理由 |
| - | - | - |
| openid | See info about users on your domain | Google 上の個人情報とユーザーを関連付けます |
| userinfo.profile | See info about users on your domain | 一般公開している個人情報を含む、ユーザーの個人情報を参照します |
| userinfo.email | See info about users on your domain | ユーザーのメインの Google アカウントのメールアドレスを参照します |
| admin.directory.group.readonly | View groups on your domain | ドメイン内のグループの詳細（名前、メンバーなど）とメタデータ（ログインの詳細など）を表示します |
| admin.directory.user.readonly | See info about users on your domain | ドメインユーザーの名前、メールアドレス、役職、部署などのプロフィール情報を参照する権限 |

### ユーザーとグループの同期のトラブルシューティング

連携を接続した後にユーザーまたはグループが Iru Endpoint に表示されない場合は、以下の確認を順番に行ってください。

<AccordionGroup>
  <Accordion title="連携を接続した後にユーザーとグループが同期されない" icon="arrows-rotate">
    最も一般的な原因は、同意が不完全なことです。管理者がすべての権限を選択せずに Google の権限画面を先に進めた場合、連携は接続されて成功と表示されますが、Iru Endpoint はディレクトリを読み取ることができません。

    [連携を再認証](/ja/endpoint/integrations/directory-services/user-directory-integration#re-authenticate-a-directory-integration)し、権限の画面で **Select all** のチェックボックスをオンにしてから **続ける** を選択します。連携が再接続されたら、次の 4 時間ごとの同期を待たずに[ユーザーディレクトリの同期を強制実行](/ja/endpoint/integrations/directory-services/user-directory-integration#force-a-user-directory-sync)してください。
  </Accordion>

  <Accordion title="管理者がユーザーとグループを読み取れることを確認する" icon="user-shield">
    Iru Endpoint は、連携を承認した管理者の権限を使用してディレクトリを読み取るため、そのアカウントにはユーザーとグループの両方に対する読み取りアクセス権が必要です。

    Google 管理コンソールで **ディレクトリ** > **ユーザー** に移動し、連携の承認に使用したアカウントを選択して、**Admin roles and privileges** を開きます。割り当てられている各ロールを開き、ユーザーとグループの読み取り権限が付与されていることを確認します。

    Directory API は Google Admin SDK に属しており、管理者に限定されています。アカウントにこれらの権限がない場合、Google は `403 Not Authorized to access this resource/api` エラーを返し、ディレクトリデータは Iru Endpoint に届きません。スコープの完全なリストについては、Google の [Choose Directory API scopes](https://developers.google.com/workspace/admin/directory/v1/guides/authorizing) を参照してください。
  </Accordion>

  <Accordion title="Google Workspace で Iru Endpoint によるディレクトリデータへのアクセスが許可されていることを確認する" icon="shield-check">
    Google Workspace の管理者は、Google Workspace API にアクセスできるアプリケーションを制限できます。この場合、同意画面が正しく見えていても同期がブロックされます。

    Google 管理コンソールで **セキュリティ** > **Access and data control** > **API controls** > **App access control** に移動し、Iru Endpoint が使用する OAuth アプリが **Limited** や **Blocked** ではなく **Trusted** になっていることを確認します。Google の同意画面では、このアプリの名前は引き続き **Kandji** です。

    これらの制御の動作の詳細については、Google の [Google Workspace のデータにアクセスできるアプリを管理する](https://knowledge.workspace.google.com/admin/apps/control-which-apps-access-google-workspace-data)を参照してください。
  </Accordion>

  <Accordion title="プライベートブラウザウィンドウで正しいアカウントを使用して承認する" icon="user-lock">
    Google は現在サインインしているアカウントに同意を適用するため、管理者以外のアカウントの既存のセッションがあると、誤ったユーザーで連携が承認される可能性があります。

    [Safari](https://support.apple.com/guide/safari/browse-in-private-ibrw1069/mac) でプライベートブラウズウィンドウを開くか、[Chrome](https://support.google.com/chrome/answer/95464) でシークレットウィンドウを開き、Google のセッションを保持している他のブラウザウィンドウをすべて閉じてから、Iru Endpoint にサインインし、正しい管理者アカウントで[連携を再認証](/ja/endpoint/integrations/directory-services/user-directory-integration#re-authenticate-a-directory-integration)してください。
  </Accordion>
</AccordionGroup>

### Google から連携の接続を解除する

<Steps>
  <Step title="Google の権限にアクセスする">
    [https://myaccount.google.com/permissions.](https://myaccount.google.com/permissions) に移動します。最初に連携を構成したのと同じアカウントでサインインしていることを確認してください。
  </Step>

  <Step title="Kandji アプリケーションを削除する">
    アプリケーションのリストで **Kandji** アプリケーションの **削除** を選択します。Google では、このアプリの名前は引き続き **Kandji** です。
  </Step>
</Steps>
