> For the complete documentation index, see [llms.txt](https://docs.expel.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.expel.io/connect-your-technology/d-j-integrations/google/google-workspace-formerly-g-suite-setup-for-workbench.md).

# Google Workspace (Formerly G Suite) Setup for Workbench

## Prerequisites <a href="#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059" id="uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059"></a>

1. You must have access to a Google user with the Super Admin role to create a service account.
2. You must be an Organization Admin user in Workbench.

## Step 1: Provision Expel Service Account in Google Workspace <a href="#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059" id="uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059"></a>

1. Go to the [Google Developers Console](https://console.developers.google.com/project) and sign in as a Super Admin.
2. Under **IAM & Admin**, click **Manage Resources**.
3. Click **Create Project**.
4. Configure the project details as follows:
   * **Project name** - enter "ExpelAPI".
   * **Organization** - enter the name of your organization.
   * **Location** - enter the location of your organization.
5. Click **Create**.
6. Each project uses its own set of APIs. For Expel to communicate with Google Workspace APIs, we need to enable the Admin SDK for the newly created project. Navigate to the newly created project.
7. Search for "Admin SDK" and open.
8. **Enable** the Admin SDK for the new project.
9. Navigate to **Menu > IAM & admin > Service accounts**.
10. Click **Create Service Account**.
11. Configure the service account as follows:
    * **Service account name** - enter "ExpelAPI".
    * **Service account ID** - enter "ExpelAPI".
    * **Service account description** - enter "ExpelAPI".
12. Click **Done**.
13. In the IAM & Admin section, click **Service Accounts**. For the service account that relates to this integration, click the **Actions** button and then **Manage keys**. In the Add Key section, click **Create new key**. Select **JSON** and click **Create**. After you click Create, a JSON file is downloaded. *Keep the JSON file in a safe place; it contains the credentials for this service account.*
14. Enable domain-wide delegation for the service account:
    * Back on the Service Accounts screen, click **Actions** and then click **Manage Details**.
    * Under the Details section, select **Enable Google Workspace Domain-wide Delegation**.
15. After the service account is created, in the Details area, copy **Unique ID**.
16. Grant the service account the required API permission scope:
    * Open the Google Workspace admin console. <https://admin.google.com/ac/owl/domainwidedelegation>
    * Navigate to **Security > API Controls > Manage Domain Wide Delegation**.
    * Click **Add New**.
      * **Client Name** - enter The Client ID that we saved from our Service Account in the [earlier step](https://support.expel.io/hc/en-us/articles/1500006064802-Google-Workspace-Formerly-G-Suite-Setup-for-Workbench#step_1_10).
      * **API Scopes** - You can copy and paste all the scopes below, or add the scopes for retrieving organizational units individually. *Note they are comma-delimited.*

        `https://www.googleapis.com/auth/admin.directory.group.readonly, https://www.googleapis.com/auth/admin.directory.user.readonly, https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly, https://www.googleapis.com/auth/admin.directory.orgunit.readonly, https://www.googleapis.com/auth/admin.reports.audit.readonly, https://www.googleapis.com/auth/admin.reports.usage.readonly`

## Step 2: Configure Google Workspace in Workbench <a href="#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26125" id="uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26125"></a>

Now that you have the correct access configured and noted the credentials, you can integrate your tech with Workbench.

1. [Log in to Workbench](https://workbench.expel.io/auth/login?orig=%2F).
2. Navigate to **Organization Settings > Security Devices**.
3. Select **Add Security Device**.
4. Search for and select **Google Workspace**.

   <div align="left"><figure><img src="/files/0smB5meLvkbOezpoJsgU" alt="Google Workspace Add a Security Device screen in Workbench." width="319"><figcaption></figcaption></figure></div>
5. Fill in the following information:
   * **Name** - enter a name that might help you more easily identify this integration, such as “CompanyName Google Workspace”; this name will display in Workbench under the Name column, and is a text string that you can filter on.
   * **Location** - enter the location of your integration, for example “cloud.” This is also a text string that you can filter on, so we recommend being consistent with location naming across your Expel integrations.
   * **Administrator username** - enter the email address of the Super Admin that created the service account in [Step 1](#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059).
   * **Service Credentials JSON** - enter the contents of the JSON file for the service account generated in [Step 1](#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059).
   * **API scopes** - enter the API Scopes from [Step 1](#uuid-0849f3e0-b14e-1f17-a2f0-df372e6310de_bridgehead-26059).
6. Select **Save**.
7. On the console access screen, select **No thanks, I will not provide console access from the dropdown**.
8. Select **Save**.

Your device should be created successfully within a few seconds. A few reminders:

* After your connection is healthy, it will take some time for your device to begin polling and receiving data.
* To check on the status, select the downward arrow for your device in the first column and choose **View details**.
* Polling will happen first; data will be received after that. **You must refresh the page to see updates.**
* If your device does not begin polling within 15 minutes, and does not begin receiving data within 30 minutes, [contact our support team for help](/support/how-to-reach-us.md).
* To check if alerts are coming through, navigate to **Dashboards > Alert Analysis**. Scroll to the device you want to check, and select the **Expel Alerts** tab to reveal more alert information. It can take 36 to 72 hours for alerts to appear after setup, as we [tune your device](/workbench-reference/alerts/how-expel-alerts-work.md#device-tuning).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.expel.io/connect-your-technology/d-j-integrations/google/google-workspace-formerly-g-suite-setup-for-workbench.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
