> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/reference-manual/v3.44.2/built-in-connectors/google-workspace.md).

# Google Workspace

The Google Workspace connector for Elimity Insights fetches users and groups for a Google Workspace tenant so you can keep in control of your environment. Follow the instructions below to set up the connector for your environment.

## 1. Setting up a dedicated service account in Google Cloud

The Google Workspace connector for Elimity Insights authenticates as a service account. We recommend creating a dedicated service account to assign the minimal amount of permissions. Refer to [the official documentation](https://developers.google.com/workspace/guides/create-credentials#create_a_service_account) for instructions on how to create a new service account. Take note of the newly created service account's email address. Generate a secret key for the service account (again, refer to [the official documentation](https://developers.google.com/workspace/guides/create-credentials#create_credentials_for_a_service_account) for more information) and store the resulting JSON file securely; you'll need it to set up a source in Elimity Insights. Also make sure to enable the Admin SDK API in the service account's related project, refer to [the official documentation](https://developers.google.com/workspace/guides/enable-apis#admin-sdk-api) for detailed instructions.

## 2. Creating a dedicated admin role in Google Workspace

We also recommend creating a dedicated admin role for the newly created service account. This admin role should only grant the 'Admin API > Groups > Read' and 'Admin API > Users > Read' privileges. [The official documentation](https://support.google.com/a/answer/2406043) contains more information about creating a new admin role in Google Workspace. This is also a good time to note down your Google Workspace customer ID, refer to [the official documentation](https://support.google.com/a/answer/10070793) for instructions on where to find this.

## 3. Assigning the admin role in Google Workspace

Follow the instructions listed in [the official documentation](https://developers.google.com/workspace/guides/create-credentials#assign_a_role_to_a_service_account) to assign the newly created admin role to the newly created service account.

## 4. Creating a source in Elimity Insights

In Elimity Insights you can now create a new Google Workspace source providing the following configuration options:

<table data-full-width="true"><thead><tr><th>Configuration option</th><th>Description</th></tr></thead><tbody><tr><td>Google Workspace customer ID</td><td>Customer identifier you noted down in step 2.</td></tr><tr><td>Group email pattern</td><td>Regular expression to filter groups by email address; leave blank to include all groups.</td></tr><tr><td>User email pattern</td><td>Regular expression to filter users by email address; leave blank to include all users.</td></tr><tr><td>Service account key</td><td>Secret key you generated in step 1.</td></tr></tbody></table>


---

# 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.elimity.com/reference-manual/v3.44.2/built-in-connectors/google-workspace.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.
