Google Workspace Directory Integration with Thunai

You can integrate your Google Workspace directory with Thunai to automatically sync users. Once synced, users will appear in the Thunai Directory module, where you can manage them for features like access restrictions in agents.


Before You Begin

  • Ensure you have access to your Google Workspace Super Admin account.

    Keep the following details ready:

    • Google Workspace JSON configuration file
    • Client ID
    • Super Admin email

Steps to Connect Google Workspace Directory

Step 1: Configuration

  1. Log in to your Thunai Admin portal.
  2. Select the tenant where you want to sync the directory.
  3. Navigate to Settings > Directory, then click Directory Sync.
  4. Click Add Directory and choose Google Workspace.

Upload/Enter the following details:

  • JSON configuration file*
  • Client ID*
  • Super Admin Email*

(Optional) Enable Auto Deletion for Users:

  • If a user is deleted in Google Workspace, they will also be deleted from Thunai during the next sync.

👉 How to Get These Details from Google Workspace:

  1. Log in to the Google Cloud Console with your Super Admin account.
  2. Create a new Project (or use an existing one).
  3. Enable the Admin SDK API.
  4. Go to APIs & Services > Credentials, create a Service Account, and download the JSON configuration file.
  5. Copy the Client ID from the service account.
  6. In the Google Admin Console, delegate domain-wide authority to the service account and authorize the required scopes (e.g., https://www.googleapis.com/auth/admin.directory.user.readonly ).
  7. Note your Super Admin Email for configuration in Thunai.

Step 2: User Mapping

Map Google Workspace attributes to Thunai schema attributes.

Only mapped users will be synced into Thunai.

Example mapping:

  • primaryEmail → email
  • name.givenName → firstName
  • name.familyName → lastName

Step 3: Policy

Define sync conditions (optional).

  • Example: Sync only users from specific Organizational Units (OUs) or with certain attributes.
  • This ensures only the required users are synced into Thunai.

Step 4: Scheduler

Choose how you want to sync users:

  • One-time sync (manual)

    Periodic sync:

    • Every hour
    • Daily at a specific time

Step 5: Sync & Manage

After setup, users will be synced into Thunai Directory and shown with Onboarded status.

You can:

  • View the Job List.
  • Perform a Manual Sync anytime by clicking Sync.
  • Update the Directory Configuration when required.

Once users are synced into Thunai Directory, you can use them in agent access restriction policies.


Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us