> For the complete documentation index, see [llms.txt](https://docs.couchdrop.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.couchdrop.io/storage/integrations/google-workspace/delegating-domain-wide-authority-in-google-workspace.md).

# Delegating Domain-Wide Authority in Google Workspace

Learn how to connect Google Workspace to Couchdrop with a Client ID and domain-wide delegation

## Overview

Google Workspace requires **domain-wide delegation** before Couchdrop can access Google Drive using the service account created for your connection.

You configure domain-wide delegation in the Google Admin Console using the **Client ID** generated by Couchdrop and the required Google OAuth scopes.

## How to delegate domain-wide authority

{% hint style="warning" %}

#### Before you start

To configure domain-wide delegation, you will need:

* Access to a Google Workspace Administrator account
* Access to the Google Admin Console
* The **Client ID** generated by Couchdrop when configuring your Google Workspace connection
  {% endhint %}

{% stepper %}
{% step %}

### Open API controls

Log in to the [**Google Admin Console**](https://admin.google.com/) for your Google Workspace domain.

Select **Security**. If **Security** is not visible, select **Show more** from the navigation menu.

Select **Access and data control**, then **API controls**.
{% endstep %}

{% step %}

### Add Couchdrop as an API client

Under **Domain-wide delegation**, select **Manage Domain Wide Delegation**.

In **API clients**, select **Add new**.

Paste the **Client ID** generated by Couchdrop into the **Client ID** field.
{% endstep %}

{% step %}

### Add the required OAuth scopes

In the **OAuth scopes (comma-delimited)** field, enter the following scopes:

```
https://www.googleapis.com/auth/drive,
https://www.googleapis.com/auth/drive.file,
https://www.googleapis.com/auth/admin.directory.user,
https://www.googleapis.com/auth/admin.directory.user.readonly,
https://www.googleapis.com/auth/admin.directory.user.security
```

Select **Authorize** to grant the requested permissions.
{% endstep %}

{% step %}

### Verify the connection in Couchdrop

Return to the Google Workspace connection in Couchdrop and test the connection.

A successful connection confirms that domain-wide delegation has been configured correctly.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
For more information about domain-wide delegation, see Google's [Control API access with domain-wide delegation](https://support.google.com/a/answer/162106?hl=en).
{% endhint %}
