website/docs/add-secure-apps/providers/gws/configure-gws.md
For more information about using a Google Workspace provider, see the Overview documentation.
Your Google Workspace organization must be configured before you create a Google Workspace provider.
The main steps to configure your Google Workspace organization are:
authentik GWS).API Library.Admin SDK API.On the Service accounts page, click the account that you just created.
Click the Keys tab at top of the page, then click Add Key > Create new key.
Select JSON as the key type, then click Create. A pop-up displays with the private key. The key can be saved to your computer as a JSON file. This key will be required when creating the Google Workspace provider in authentik.
:::info Allow key creation
By default, the Google Cloud organization policy iam.disableServiceAccountKeyCreation prevents creating service account keys. To allow key creation:
On the service account page, click the Details tab, and expand the Advanced settings area.
Copy the Client ID (under Domain-wide delegation), and then click View Google Workspace Admin Console.
Log in to the Admin Console, and then navigate to Security > Access and data control > API controls.
On the API controls page, click Manage Domain Wide Delegation.
On the Domain Wide Delegation page, click Add new.
In the Add a new client ID box, paste in the Client ID that you copied from the Admin console earlier (the value from the downloaded JSON file) and paste in the following scope documents:
https://www.googleapis.com/auth/admin.directory.userhttps://www.googleapis.com/auth/admin.directory.grouphttps://www.googleapis.com/auth/admin.directory.group.memberhttps://www.googleapis.com/auth/admin.directory.domain.readonlyDelegated Subject is a required field when creating the Google Workspace provider in authentik. This field must be populated with the email address of a Google Workspace user with suitable permissions.
:::warning We do not recommend using an administrator account for the Delegated Subject user. A custom role should be used instead, see the Google Admin console documentation for more details. :::
The Delagated Subject user requires the following permissions:
Now that you have configured your Google Workspace organization, you are ready to create a Google Workspace provider.