# Google Workspace (GSuite) Groups

Groups in Google Workspace allow for communication and collaboration within an organization. Administrators can create groups to manage settings and access to services for different sets of users. Users can utilize groups for activities, such as team communication, document sharing, and meetings.

Through this integration, Apono helps you securely manage access for sets of users in your Google Workspace.

{% hint style="info" %}
The groups feature in Google Workspace differs from the Google Groups product.
{% endhint %}

***

## Prerequisites

<table><thead><tr><th width="259">Item</th><th>Description</th></tr></thead><tbody><tr><td><strong>Apono Connector</strong></td><td>On-prem <a href="../../gcp-environment/apono-connector-for-gcp">connection</a> serving as a bridge between a GCP instance and Apono</td></tr><tr><td><strong>Google Workspace Super Admin Role</strong></td><td>User role enabling your user account to configure settings in Google Workspace</td></tr><tr><td><strong>Google Workspace Customer ID</strong></td><td>Unique account ID<br><br>On the <a href="https://admin.google.com/ac/accountsettings"><strong>Account settings</strong></a> page, under <strong>Profile</strong>, copy the <strong>Customer ID</strong>.</td></tr></tbody></table>

***

### Enable Google Admin API

Apono leverages the directory API to list and edit groups, which requires the Google Admin SDK API enabled in the service account GCP Project.

Follow this step:

1. In your shell environment, log in to Google Cloud and enable the API.

```bash
gcloud auth login
gcloud services enable admin.googleapis.com --project <GCP_PROJECT_ID>
```

***

### Assign Apono admin role

In your Google Workspace, you must add the service account associated with the Apono connector to the Groups Admin role.

<figure><img src="https://1094436629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv6MBfUGvblSdAz31yJXm%2Fuploads%2Fgit-blob-9796cb75b2caca386380d7752781e0ab4cf2f1d2%2FGsuite-1.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Follow these steps to assign this role:

1. On the [**Admin roles**](https://admin.google.com/ac/roles) page, hover over the **Groups Admin** row. Several menu options appear.
2. Click **Assign admin**. The **Groups Admin** page appears.
3. Click **Assign service accounts**. The **Assign role - Groups Admin modal** appears.
4. Under **Add service accounts**, enter *apono-connector-iam-sa@$PROJECT\_ID.iam.gserviceaccount.com*. Be sure to replace `$PROJECT_ID` with the project ID where the connector is installed.
5. Click **ADD**.
6. Click **ASSIGN ROLE**.

***

### Manage Google Workspace admin roles

You can also configure admin role management for your Google Workspace integration. This adds Admin Role as a selectable resource in [Integrate Google Groups](#integrate-google-groups) (step **2**).

<figure><img src="https://1094436629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv6MBfUGvblSdAz31yJXm%2Fuploads%2Fgit-blob-c2bf5c6619f21b8820160011b6e53360ba7452c0%2Fintegrate-google-group.png?alt=media" alt="" width="375"><figcaption><p>Admin Role resource in Apono</p></figcaption></figure>

#### Grant the service account serviceAccountTokenCreator permissions

Enable the connector to sign domain-wide delegation tokens required to impersonate a Workspace Super Admin user for managing admin roles.

Follow these steps:

1. Copy the service account email for the connector defined in step **4** of [Assign Apono admin role](#assign-apono-admin-role).
2. In your shell environment run the following command.

```shellscript
gcloud iam service-accounts add-iam-policy-binding \\
    <CONNECTOR_SA_EMAIL> \\
    --member="serviceAccount:<CONNECTOR_SA_EMAIL>" \\
    --role="roles/iam.serviceAccountTokenCreator" \\
    --project <GCP_PROJECT_ID>
```

#### Configure Domain-wide Delegation

Enable Google Workspace to trust the connector service account to act on behalf of users in the domain for user and role management operations.

Follow these steps:

1. From the [**Service Account**](https://console.cloud.google.com/iam-admin/serviceaccounts) page, click the connector service account.
2. On the **Details** tab, copy the **Unique ID**.
3. From the [**Admin**](https://admin.google.com/) page, from the side navigation, click **Security > Access and data control > API Controls**. The **API Control** page appears.
4. Under **Domain wide delegation**, click **MANAGE DOMAIN WIDE DELEGATION**. The **Domain-wide Delegation** page appears.
5. Click **Add new**. The **Add a new client ID** pop-up window appears.
6. For the **Client ID**, enter the unique ID value from step **2**.
7. For the **OAuth scopes**, enter *<https://www.googleapis.com/auth/admin.directory.user,https://www.googleapis.com/auth/admin.directory.rolemanagement>*.
8. Click **AUTHORIZE**.

{% hint style="info" %}
Propagation may take a few minutes.
{% endhint %}

#### Create a dedicated Super Admin user

Create a Google Workspace user that the connector will use exclusively for impersonation. This user must have the **Super Admin** role assigned.

Follow these steps:

1. On the [**Admin**](https://admin.google.com/) page, from the side navigation, click **Directory > Users**. The **Users** page appears.
2. Click **Add new user**.
3. Create the new user. Use a dedicated Apono account, such as *<apono-connector-user@myworkspace.com>*.
4. From the side navigation, click **Account > Admin roles**. The **Admin roles** page appears.
5. In the row of the **Super Admin**, click **Actions > Assign Admin**. The **Super Admin** page appears.
6. Click **Assign users**.
7. Select the user created in step **3**.
8. Click **ASSIGN ROLE**.

{% hint style="info" %}
After granting or revoking permissions, the Google Admin UI may not immediately reflect the change. You may still see options from your previous role, but any restricted actions will fail. Permissions are enforced even if the UI appears unchanged.
{% endhint %}

***

### Integrate Google Groups

<figure><img src="https://1094436629-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fv6MBfUGvblSdAz31yJXm%2Fuploads%2Fgit-blob-c2bf5c6619f21b8820160011b6e53360ba7452c0%2Fintegrate-google-group.png?alt=media" alt="" width="563"><figcaption><p>Google Group tile</p></figcaption></figure>

{% hint style="success" %}
You can also use the steps below to integrate with Apono using Terraform.

In step **9**, instead of clicking **Confirm**, follow the **Are you integrating with Apono using Terraform?** guidance.
{% endhint %}

Follow these steps to complete the integration:

1. On the [**Catalog**](https://app.apono.io/catalog?search=Google+Group) tab, click **Google Group**. The **Connect Integration** page appears.
2. Under **Discovery**, click one or more resource types to sync with Apono.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Apono automatically discovers and syncs all the instances in the environment. After syncing, you can manage <strong>Access Flows</strong> to these resources.</p></div>
3. Click **Next**. The **Apono connector** section expands.
4. From the dropdown menu, select a connector.

{% hint style="success" %}
If the desired connector is not listed, click **+ Add new connector** and follow the instructions for creating a [GCP connector](https://docs.apono.io/docs/gcp-environment/apono-connector-for-gcp).
{% endhint %}

4. Click **Next**. The **Integration Config** section expands.
5. Define the **Integration Config** settings.

   <table><thead><tr><th width="221">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Integration Name</strong></td><td>Unique, alphanumeric, user-friendly name used to identify this integration when constructing an access flow</td></tr><tr><td><strong>Customer ID</strong></td><td>Unique Google account ID</td></tr><tr><td><strong>Super Admin Email</strong></td><td><p>Email address of the dedicated Super Admin user</p><p><br>This is the same email used in step <strong>3</strong> of <a href="#create-a-dedicated-super-admin-user">Create a dedicated Super Admin user</a>.</p></td></tr></tbody></table>
6. Click **Next**. The **Get more with Apono** section expands.
7. Define the **Get more with Apono** settings.

   <table><thead><tr><th width="222">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Credential Rotation</strong></td><td>(Optional) Number of days after which the database credentials must be rotated<br><br>Learn more about the <a href="../../architecture-and-security/credentials-rotation-policy">Credentials Rotation Policy</a>.</td></tr><tr><td><strong>User cleanup after access is revoked (in days)</strong></td><td><p>(Optional) Defines the number of days after access has been revoked that the user should be deleted</p><p><br>Learn more about <a href="../../architecture-and-security/periodic-user-cleanup-and-deletion">Periodic User Cleanup &#x26; Deletion</a>.</p></td></tr><tr><td><strong>Custom Access Details</strong></td><td>(Optional) Instructions explaining how to access this integration's resources<br><br>Upon accessing an integration, a message with these instructions will be displayed to end users in the User Portal. The message may include up to <strong>400 characters</strong>.<br><br>To view the message as it appears to end users, click <strong>Preview</strong>.</td></tr><tr><td><strong>Integration Owner</strong></td><td><p>(Optional) Fallback approver if no <a href="../../access-flows/dynamic-access-management/resource-and-integration-owners">resource owner</a> is found<br><br>Follow these steps to define one or several integration owners:</p><ol><li>From the <strong>Attribute</strong> dropdown menu, select <strong>User</strong> or <strong>Group</strong> under the relevant identity provider (IdP) platform.</li><li>From the <strong>Value</strong> dropdown menu, select one or multiple users or groups.</li></ol><p><br><strong>NOTE</strong>: When <strong>Resource Owner</strong> is defined, an <strong>Integration Owner</strong> must be defined.</p></td></tr><tr><td><strong>Resource Owner</strong></td><td><p>(Optional) Group or role responsible for managing access approvals or rejections for the resource<br><br>Follow these steps to define one or several <a href="../../access-flows/dynamic-access-management/resource-and-integration-owners">resource owners</a>:</p><ol><li>Enter a <strong>Key name</strong>. This value is the name of the tag created in your cloud environment.</li><li>From the <strong>Attribute</strong> dropdown menu, select an attribute under the IdP platform to which the key name is associated.<br><br>Apono will use the value associated with the key (tag) to identify the resource owner. When you update the membership of the group or role in your IdP platform, this change is also reflected in Apono.</li></ol><p><br><strong>NOTE</strong>: When this setting is defined, an <strong>Integration Owner</strong> must also be defined.</p></td></tr></tbody></table>
8. Click **Confirm**.

<details>

<summary>💡Are you integrating with Apono using Terraform?</summary>

If you want to integrate with Apono using Terraform, follow these steps instead of clicking **Confirm**:

1. At the top of the screen, click **View as Code**. A modal appears with the completed Terraform configuration code.
2. Click to copy the code.
3. Make any additional edits.
4. Deploy the code in your Terraform.

Refer to [Integration Config Metadata](https://docs.apono.io/metadata-for-integration-config) for more details about the schema definition.

</details>

Now that you have completed this integration, you can [create access flows](https://docs.apono.io/docs/access-flows/access-flows) that grant permissions to groups within your Google Workspace.


---

# Agent Instructions: 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:

```
GET https://docs.apono.io/docs/additional-integrations/identity-providers/google-workspace-gsuite-groups.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
