> 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 %}


---

# 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.couchdrop.io/storage/integrations/google-workspace/delegating-domain-wide-authority-in-google-workspace.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.
