# Google Workspace

## Google Workspace Overview

Herd allows organizations using Google Workspace as their Identity provider to sync users and groups for training and simulation assignment and management. Herd utilizes Google’s Admin SDK API through the Google Cloud Console.&#x20;

Please Note: You’ll need to have administrator privileges in Google cloud and Google Workspace to complete this integration.

### Step 1 – Create a Google Cloud project

Begin by creating a separate Google Cloud Project for this integration. This will allow for simple management and no conflicts with other Google Cloud integrations you may add in the future.

1. Open Your Google Cloud Console, as an administrator.
2. On the top toolbar, click the box that says, *Select A Project*.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2Fr6CR3Fe8ALWi2Stj9qZy%2FScreenshot%202025-12-12%20at%2010.59.51.png?alt=media&#x26;token=d82504d1-c52c-4e5e-913a-a224e602fd77" alt=""><figcaption></figcaption></figure>

3. On top left of the modal pop-up, select your organizations domain. Then select *New project.*
4. Name the project *Herd Integration*
5. Select your organization and location.
6. Select any location based on your preference.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FKaUYVasBHdfJglqbcq6O%2FScreenshot%202025-12-12%20at%2011.03.18.png?alt=media&#x26;token=244a8d79-5e93-42ce-86dd-d6f3d940cfa4" alt=""><figcaption></figcaption></figure>

7. Click the blue **Create** button.

{% hint style="info" %}
Note: It may take several minutes for the project to create. It must be fully created before moving on to step 2. Check the progress within your Google Cloud notifications.
{% endhint %}

### Step 2 - Select the Project

Ensure you’ve selected the Herd project created in Step 1.

1. Select the box on the top toolbar with your organization name.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2F0eZKjwISrGMQmk5DrKP6%2FScreenshot%202025-12-12%20at%2011.06.10.png?alt=media&#x26;token=8459d8b7-0be5-491f-a9fa-1c330714553a" alt=""><figcaption></figcaption></figure>

2. Select the project *Herd* *Integration*

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FJQfmCwDnE9YUprv206ZO%2FScreenshot%202025-12-12%20at%2011.33.08.png?alt=media&#x26;token=7d4bf12b-eca7-4eaa-8878-76a754e58d90" alt=""><figcaption></figcaption></figure>

You’ll be operating in this new project for the rest of the integration.

### Step 3 – Enable the Admin SDK API

For this integration, we’ll utilize Google’s preexisting Admin SDK API.

1. Select the hamburger stack symbol, to the left of the Google Cloud logo, in the top toolbar.
2. Within the navigation, go to **APIs & Services** and select **Enabled APIs & Services**.
3. Select the *+ Enable APIs and services.* At the top of the section. You’ll be taken to Google API Library

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FWkSJqfZY2gBAiSBNhPy0%2FScreenshot%202025-12-12%20at%2011.09.08.png?alt=media&#x26;token=8b22ab64-5fc0-4bb5-8ff4-6672ea8a12d3" alt=""><figcaption></figcaption></figure>

4. In the search box, type in **Admin SDK API.**
5. Once found, select **Admin SDK API**, then click **Enable**.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FLC5EuHNJSLFxHEzWjmTi%2FScreenshot%202025-12-12%20at%2011.09.57.png?alt=media&#x26;token=131b4662-1970-4aab-96d9-55da2c42527a" alt=""><figcaption></figcaption></figure>

### Step 4 – Create a Service Account

A dedicated service account, with domain-wide access, is needed to sync all group membership.

1. Check the top toolbar and ensure you’re within the *Herd* project
2. Select the hamburger icon to open the left side navigation, go to **IAM & Admin** and select **Service Accounts**.
3. Select **+ Create service account** on the top toolbar

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FHRKGjXdCSSJjilnc485e%2FScreenshot%202025-12-12%20at%2011.12.05.png?alt=media&#x26;token=a84c2e85-d54f-46a7-a1aa-764b721db6d2" alt=""><figcaption></figcaption></figure>

4. Enter a service account name, for example: **`herd-integration`** Then put a service account description **For Herd Integration.** The service account ID should automatically populate.
5. Click **Create and Continue**.
6. Skip role and user access (leave defaults) and click **Done**.

This creates the dedicated identity Herd will use to access your domain data via APIs.

### Step 5 - Save Service Account Details

You’ll need the new service account OAuth2 Client ID For Step 8

1. Copy and save the **OAuth 2 Client ID.** It is within the row that populated on the service account page and should be a 20-character string of numbers, for example: `234567890192872817`

### Step 6 - Grant IAM Permissions To Service Account

1. Select the hamburger logo on the top left, next to the Google Cloud logo.
2. Hover over **IAM & Admin** and select **IAM.**
3. On the top toolbar, select the Herd Integration project in the box right of the Google Cloud logo.
4. Switch to the Organization level, by select the Organization domain that the Herd Integration Project is within. This is likely your companies domain.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FLNO9VY9AHCrFbxdW3juP%2FScreenshot%202025-12-12%20at%2011.21.30.png?alt=media&#x26;token=16d71e12-faae-4326-b425-4ece9241c589" alt=""><figcaption></figcaption></figure>

5. When the page updates, select the *+ Grant Access* button
6. With the **Add Principals** box, add the email of the account you’re currently logged into as an administrator in the google cloud console. This is likely your generic organizational email. Example: `<user>@google.com`
7. Under **Assign Roles** select the dropdown box and search for `Organization Policy Administrator` . Once found, select it. Then **Save.**

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FFYHXMxKMM37e6pu5oVUS%2FScreenshot%202025-12-12%20at%2011.26.11.png?alt=media&#x26;token=3c29d09b-96c5-4889-b0bf-836bacad0be0" alt=""><figcaption></figcaption></figure>

### Step 7 - Disable Legacy Service Key Creation Policy

By default, Google Cloud has an IAM policy that doesn’t allow the creation of JSON keys for service accounts, which is needed for the next step of this integration. We’ll need to disable this IAM policy.

1. On the top toolbar, select the box with your Herd project and go back to the your organization.
2. Select the hamburger logo, hover over **IAM & Admin** and select **Organization Policies.**
3. Scroll down slightly to the filter box above the table that lists all active and inactive policies. Copy and paste: `iam.disableServiceAccountKeyCreation` and hit enter.
4. Select the policy name **Disable Service Account Key Creation,** it’ll match the ID that we pasted above.
5. On the right, select the pencil icon with **Manage Policy.**
6. Select the radio button next to **Inherit Parents Policy.**
7. Click **Set Policy.**
8. The status should show “Not Enforced” in the box below.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2Fxhft70RZGtTCGCh5xzSh%2FScreenshot%202025-12-12%20at%2011.55.55.png?alt=media&#x26;token=ea10c7a6-e069-45c3-af52-6d225718c9ee" alt=""><figcaption></figcaption></figure>

### Step 8 – Create and Download JSON Key

1. On the top toolbar, select the box with your organization and go back to the Herd Integration Project.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FJQfmCwDnE9YUprv206ZO%2FScreenshot%202025-12-12%20at%2011.33.08.png?alt=media&#x26;token=7d4bf12b-eca7-4eaa-8878-76a754e58d90" alt=""><figcaption></figcaption></figure>

2. Select the hamburger icon on the top toolbar, and hover over **IAM & Admin** then select **Service Accounts.**
3. Select the Service Account created in Step 4.
4. On the next page, there will be multiple tabs. Select the one that says **Keys.**

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2F4YaaX4S25rOJTZCp4F7K%2FScreenshot%202025-12-12%20at%2011.34.49.png?alt=media&#x26;token=37e370c2-6f34-4802-a577-c028a7ae3e31" alt=""><figcaption></figcaption></figure>

5. Down the page, you’ll find a dropdown that says **Add Keys**. Select it and select **Create New Key.**
6. Select **JSON**, then click **Create**.
7. A JSON key file is downloaded to your computer.
8. Copy and save the key for use in the next step.

   > **Treat this JSON file as a secret and store it securely. It grants API access when combined with domain-wide delegation.**

* Note: If you get an error that the organizational policy is blocking the service account key creation, go back and ensure that step 6 was performed properly.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FA440xIEFgUHfhFS1WJjt%2FScreenshot%202025-12-12%20at%2011.36.22.png?alt=media&#x26;token=a2e26030-6977-45ca-a8e6-c125abc967a5" alt=""><figcaption></figcaption></figure>

### Step 9 – Configure domain-wide delegation in the Admin console

1. Open a new tab in your browser and go to the Google Admin console as a super admin:

   **`https://admin.google.com`**
2. On the left side toolbar, look for the **Security** dropdown. Note that it may be hiding under a “show more” button.
3. Select Security → Access and data control → API Controls.
4. On the bottom of the newly loaded page, look for the box named: **Domain-wide Delegation.** Select **Manage Domain Wide Delegation.**

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FLoI851LIuiTevwehxTfo%2FScreenshot%202025-12-12%20at%2012.01.10.png?alt=media&#x26;token=80b56b0f-3b7a-44f6-97d6-e90473aa25ad" alt=""><figcaption></figcaption></figure>

5. You’ll be taken to a page titled API Clients. In the top toolbar, select **Add New.**
6. In **Client ID**, paste the **Client ID** of the **`herd-integration`** service account that was created in Step 5.
7. In **OAuth scopes,** enter the following scopes:
   * `https://www.googleapis.com/auth/admin.directory.user.readonly`
   * `https://www.googleapis.com/auth/admin.directory.group.readonly`
   * `https://www.googleapis.com/auth/admin.directory.customer.readonly`

* Note: You’ll need to enter each row separately. Entering them on one line will not work.

1. Click **Authorize**.

These scopes grant read-only access to users, groups, and customer information, which is sufficient for Herd to discover and sync users and groups.

### Step 10 – Connect Herd to Google Workspace

1. Open a new tab and login to your Herd Security admin console.
2. On the left side toolbar, select **Administration.**
3. Scroll down to the Google Workspace Integration section and select the dropdown arrow next to **Google Workspace Configuration Settings.**
4. Provide the following values:
   1. Google Workspace Domain: **`yourcompany.com`**
   2. Admin Email: The Admin Email within the same domain that is a super admin within Google Workspace.
   3. Service Account JSON Key: Paste the key that was created in Step 8

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FNhc763DQ3MgULFwCCINb%2FScreenshot%202025-12-12%20at%2012.08.32.png?alt=media&#x26;token=9aea1cc3-a0a1-4ef2-9b45-531791d6b97b" alt=""><figcaption></figcaption></figure>

5. Select Save Google Workspace Configuration

### Step 11 - Confirm User Sync

1. On the same page, select the Sync Google Workspace Users
2. If successful, a status box with the last time grouped sync will appear.

<figure><img src="https://2286452423-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrNdsHrfHsFuaMzCbOD5q%2Fuploads%2FHnQ1rKB5yLxrKiRKGSaq%2FScreenshot%202025-12-12%20at%2012.08.59.png?alt=media&#x26;token=d89ed2b5-6e7b-44d2-a4a1-8cc366f5877c" alt=""><figcaption></figcaption></figure>

You can now successfully assign trainings to groups of users from your Google Workspace!
