--- title: "Google Workspace setup instructions" slug: "dex-google-workspace" updated: 2026-11-30T12:32:19Z published: 2026-11-30T12:32:19Z canonical: "documentation.sysaid.com/dex-google-workspace" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.sysaid.com/llms.txt > Use this file to discover all available pages before exploring further. # Google Workspace setup instructions COLLABORATION & MESSAGING Service account + domain-wide delegation To connect Dex to your Google Workspace environment, you need to configure a Google Cloud service account with domain-wide delegation. ## Steps 1. Go to the Google Cloud Console and create a new project or select an existing one. 2. Navigate to APIs & Services > Library, search for Admin SDK API, and click Enable. 3. Go to IAM & Admin > Service Accounts and click Create Service Account; give it a name (e.g., dex-management-sa), click Create and Continue, skip optional permissions, and click Done. 4. Select the service account, go to the Keys tab, click Add Key > Create new key, select JSON, and download the key file. 5. Open the JSON key file. You will need the client_email (Service Account Email), the private_key (Private Key PEM), and the client_id. 6. Open the Google Workspace Admin Console and go to Security > Access and data control > API controls. 7. Under Domain-wide delegation, click Manage Domain-Wide Delegation, then click Add new. 8. In the Client ID field, paste the client_id (numeric string) from the JSON key file. 9. In the OAuth scopes field, paste this comma-separated list, then click Authorize: https://www.googleapis.com/auth/admin.directory.user, https://www.googleapis.com/auth/admin.directory.group, https://www.googleapis.com/auth/admin.directory.orgunit, https://www.googleapis.com/auth/admin.directory.device.mobile, https://www.googleapis.com/auth/admin.directory.rolemanagement.readonly, https://www.googleapis.com/auth/admin.directory.resource.calendar ## Paste into Dex The connection form in the Dex app store asks for these values: - Service Account Email The client_email from the JSON key file. - Private Key (PEM) The private_key from the JSON key file. Links on page: [Open Google Workspace console](https://console.cloud.google.com/iam-admin/serviceaccounts), [Official docs](https://support.google.com/a/answer/162106).