> For the complete documentation index, see [llms.txt](https://docs.euno.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.euno.ai/sources/identity-and-organization/google-workspace-integration.md).

# Google Workspace

## Overview

Euno integrates with Google Workspace to observe users and groups from your identity and access management system. This integration enables you to track user accounts, groups, and group memberships in your data model, providing visibility into organizational structure and access patterns.

Euno's Google Workspace integration supports auto-discovery of the following resources:

* Users (`user`)
* User groups (`user_group`)

For properties and relationships, see [Google Workspace Integration Discovered Resources](/sources/identity-and-organization/google-workspace-integration/google-workspace-integration-discovered-resources.md).

## Requirements

To ingest metadata from Google Workspace, you need:

* A Google Workspace organization
* A **Super Admin** for one-time setup: create/assign the directory-reader role (Step 1) and authorize domain-wide delegation (Step 2). Super Admin is **not** the user Euno impersonates.
* A Google Workspace user with a **read-only directory** admin role (Step 1). Use that user's email as **Admin User Email**. A dedicated user is recommended, but any existing user with only this role works.
* Euno's service account client ID authorized with these OAuth scopes:
  * `https://www.googleapis.com/auth/admin.directory.user.readonly` — list users
  * `https://www.googleapis.com/auth/admin.directory.group.readonly` — list groups and group members

Euno only lists users, groups, and group members.

## Setup Instructions

### Step 1: Create a least-privilege directory reader

Domain-wide delegation lets Euno's service account call the Admin SDK **as a user in your domain**. That user must have Admin SDK privileges to read the directory. Super Admin works, but it is more privilege than Euno uses.

Create a custom admin role that can only read users and groups, then assign it to the user whose email you will put in **Admin User Email**. That can be a dedicated account (for example, `euno-directory@customer.com`) or any existing user. Euno does not require a separate user.

1. Sign in to the [Google Admin Console](https://admin.google.com/) as a Super Admin.
2. (Optional) Create a dedicated user (**Directory** → **Users** → **Add new user**). Skip this if you are assigning the role to an existing user.
3. Go to **Account** → **Admin roles** → **Create new role**. Name it something like `Euno directory reader`.
4. Under **Admin privileges**, grant **Read** only (not Create, Update, or Delete) for:

* **Users**
* **Groups**

5. Save the role.
6. Assign the role to that user for **all organizational units** (unless you intend to observe only a subset of the directory).

{% hint style="info" %}
If you assign the role to a person who already has Super Admin or another write-capable admin role, Euno inherits those privileges while impersonating them. Prefer a user who has **only** this read-only role.
{% endhint %}

{% hint style="info" %}
Do **not** assign Super Admin, User Management Admin, Groups Admin, or Groups Editor. Those roles can create, update, or delete users or groups. The prebuilt **Groups Reader** role is read-only for groups, but it does not grant user listing; a custom role with Users **Read** and Groups **Read** is the smallest fit.
{% endhint %}

{% hint style="info" %}
Domain-wide delegation is authorized on Euno's **service account client ID**, not on this user. The user only needs to exist in the domain and hold the directory-read role.
{% endhint %}

### Step 2: Configure Domain-Wide Delegation in Google Workspace

A Super Admin must do this once. It authorizes Euno's service account; it does not make Euno run as Super Admin.

1. Sign in to your [Google Admin Console](https://admin.google.com/) as a Super Admin.
2. Navigate to **Security** → **Access and data control** → **API Controls**
3. Under **Domain-wide delegation**, click **Manage Domain Wide Delegation**
4. Click **Add new** to add a new client
5. Enter Euno's service account client ID: `105907650580827198566`
6. In the **OAuth scopes** field, enter the following scopes (comma-separated):

```
 https://www.googleapis.com/auth/admin.directory.user.readonly,https://www.googleapis.com/auth/admin.directory.group.readonly
```

7. Click **Authorize**

### Step 3: Configure the Google Workspace source in Euno

1. Go to the **Sources** page.
2. Click **Add New Source** and select **Google Workspace**.
3. Fill in the configuration below.
4. Click **Save**.

Asterisk (\*) means a mandatory field.

| Configuration                 | Description                                                                                                                                                                                                                      |
| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**\*                    | A name for this Google Workspace source (for example, `Google Workspace - Production`).                                                                                                                                          |
| **Google Workspace Domain**\* | Your Google Workspace domain (for example, `customer.com`).                                                                                                                                                                      |
| **Admin User Email**\*        | Email of the user from Step 1 who has the directory-reader role (for example, `euno-directory@customer.com` or an existing user). Euno's service account impersonates this user to call the Admin SDK. Do not use a Super Admin. |

{% hint style="info" %}
The service account key is configured by Euno. You do not paste a key in this form. You only authorize Euno's service account client ID in Google Admin Console (Step 2).
{% endhint %}

### Step 4: Schedule

1. Toggle **Schedule** to activate updates.
2. Configure:
3. **Weekly**: Select the days and times for updates.
4. **Hourly**: Set the interval in hours.

### Step 5: Resource Cleanup

To keep your data relevant and free of outdated resources, Euno provides automatic **resource cleanup** options. These settings determine when a resource should be removed if it is no longer detected by a source. For a detailed explanation on Euno's cleanup strategies, see [Resource Sponsorship in Euno](/developer-reference/technical-concepts/resource-sponsorship-and-cleanup-in-euno.md).

* **Immediate Cleanup**: Remove resources not detected in the most recent successful source run. This is the default for Google Workspace.
* **No Cleanup**: Keep all resources indefinitely, even if they are no longer detected.

## What Euno Discovers

### Users

Euno observes users from your Google Workspace organization that have a primary email. For each user, Euno captures:

* Primary email, stored as both `name` and `email_address` and used to build the resource URI
* Display name (`label`)

Users without a primary email are skipped.

### User Groups

Euno observes groups from your Google Workspace organization. For each group, Euno captures:

* Group name
* Google Workspace group ID (`native_id`)
* Creation timestamp
* Direct memberships of users and nested groups (`has member` / `has group`)

### Group Memberships

Euno observes direct memberships, including users and nested groups (groups that are members of other groups). Nested groups are also observed as separate `user_group` resources.

## Troubleshooting

### Authentication Errors

If you encounter authentication errors (401/403):

* Verify that domain-wide delegation is configured in Google Workspace Admin Console
* Ensure the service account client ID is correctly entered in the Admin Console
* Check that the OAuth scopes are exactly as specified (comma-separated, no spaces)
* Verify that admin consent has been granted for the scopes
* Wait a few minutes for changes to propagate (domain-wide delegation changes can take time to take effect)

### Missing Users or Groups

If users or groups are not appearing in Euno:

* Verify that the domain-wide delegation is properly configured
* Check that **Admin User Email** exists in the domain (the impersonated user, not Super Admin)
* Confirm that user has a custom admin role with Users **Read** and Groups **Read**, assigned for the organizational units you want to observe
* Verify that the admin user email is correctly entered in the source configuration
* Review the source run report for any errors or warnings
* Users without a primary email are not observed

### Group Members Not Showing

If group members are not being observed:

* Verify that domain-wide delegation includes the group read scope
* Check that groups have members assigned in Google Workspace
* Review the source run report for any API errors when fetching group members


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.euno.ai/sources/identity-and-organization/google-workspace-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
