# How to Configure Google Workspace SSO in Teleport (OIDC Guide)

Last verified: December 2026 (Teleport 19.0.x)

Configure Google Workspace as an OpenID Connect (OIDC) identity provider for a self-hosted Teleport cluster, with automatic mapping of Google Groups to Teleport roles. You will set up the Google Cloud OAuth 2.0 client, create a service account in the Console or with Terraform, grant domain-wide delegation, apply the Teleport `kind: oidc` (`version: v3`) connector, and verify login with `tsh`.

Google Workspace SSO requires Teleport Enterprise. If you are running Community Edition, this guide also covers your options for integrating corporate SSO without upgrading to Enterprise.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

### Teleport cluster[​](#teleport-cluster "Direct link to Teleport cluster")

Verify the edition your cluster runs from your workstation:

******Terminal

```bash
tctl status
Cluster      teleport.example.com
Version      19.0.0
```

Then check the server binary on an Auth Service host:

******Terminal

```bash
teleport version
Teleport Enterprise v19.0.0 git:v19.0.0 go1.25.5
```

The output must contain `Teleport Enterprise`. If it reads only `Teleport`, the cluster is Community Edition and cannot create this connector.

Google Workspace OIDC requires Teleport Enterprise

Teleport Community Edition supports GitHub SSO and local users. It rejects the connector in this guide with `ERROR: OIDC is only available in Teleport Enterprise`, and no configuration switch enables `kind: oidc`. If your binary reads `Teleport` rather than `Teleport Enterprise`, see [Google SSO for Teleport Community Edition](#google-sso-for-teleport-community-edition) for your options (upgrading to Enterprise, maintaining a fork, or switching to AlmaForge).

### Google Workspace admin[​](#google-workspace-admin "Direct link to Google Workspace admin")

You need a **Google Workspace Super Admin** account (protected by MFA) to authorize domain-wide delegation. You also need an active Workspace admin account with permission to read directory groups and memberships for `google_admin_email`. The service account impersonates this user at sign-in, and it does not need to be a Super Admin.

### Google Groups[​](#google-groups "Direct link to Google Groups")

Have at least one Google Group in your Workspace organization ready to map to Teleport roles. Teleport matches groups by their full primary email address (for example, `devops@example.com`), not by display name. Use a direct member of a mapped group for the first sign-in test. This tests the connector and role mapping without adding nested-group resolution to the first check.

### Google Cloud project[​](#google-cloud-project "Direct link to Google Cloud project")

Google Workspace manages users and groups, while Google Cloud manages OAuth apps and API credentials. Even if you do not run any workloads on Google Cloud, Google requires a project in your Workspace organization to hold the OAuth 2.0 consent screen and client ID, enable the Cloud Identity API, and own the service account that queries Google Groups.

Create a dedicated project for SSO or reuse an existing one in the same organization. You need permission to configure OAuth clients, enable APIs, and create a service account and JSON key. The project, OAuth client, enabled API, service account, and JSON key do not incur Google Cloud usage charges.

### Network access from Auth Service hosts[​](#network-access-from-auth-service-hosts "Direct link to Network access from Auth Service hosts")

The Auth Service completes Google sign-in and looks up the user's groups before assigning Teleport roles. Allow outbound HTTPS (TCP port 443) from every Auth Service host to these endpoints.

* `accounts.google.com` provides Google's OIDC configuration.
* `oauth2.googleapis.com` exchanges the browser's authorization code for tokens.
* `www.googleapis.com` provides the public keys used to verify the ID token.
* `cloudidentity.googleapis.com` returns the user's group memberships.

Run this check from each Auth Service host.

******Terminal

```bash
for host in accounts.google.com oauth2.googleapis.com www.googleapis.com \
    cloudidentity.googleapis.com; do
    curl -sS --max-time 10 -o /dev/null -w "${host}: HTTP %{http_code}\n" "https://${host}/"
  done
```

An HTTP response confirms connectivity. If curl reports `HTTP 000`, check DNS, firewall, proxy, or TLS settings before continuing.

## Step 1. Configure the OAuth consent screen[​](#step-1-configure-the-oauth-consent-screen "Direct link to Step 1. Configure the OAuth consent screen")

Console only

Google provides no API for configuring this OAuth 2.0 consent screen, so there is no Terraform resource or `gcloud` command for it. Complete this step in the Google Cloud Console.

1. In the Google Cloud Console, select your project. In the search bar, type `Google Auth Platform` and open the [Google Auth Platform result](https://console.cloud.google.com/auth/overview).

   ![Google Cloud search result for Google Auth Platform](/assets/images/google-cloud-search-auth-platform-f18d55ccb2b895706f8f2f37a14c50fc.png)

2. In **Overview**, click **Get started**. If you already configured the consent screen, open **Audience**, verify that it is **Internal**, and continue to [Step 2](#step-2-enable-the-cloud-identity-api).

   ![Get started on the Google Auth Platform overview](/assets/images/google-auth-platform-get-started-7b2e89fa6355fb873a87a320f2e5da57.png)

3. Under **App Information**, enter an app name such as `Teleport Access`, choose a support email, and click **Next**.

   ![App Information form with the app name and support email field](/assets/images/google-oauth-consent-app-name-df758fd0c1d73c49b905e4c00aab4f5e.png)

4. Under **Audience**, select **Internal** and click **Next**. This limits sign-in to users in your Workspace organization.

   ![Audience form with Internal selected](/assets/images/google-oauth-consent-internal-audience-f2ec3a942419f658e6763d20213485fb.png)

5. Under **Contact Information**, add an email address for project notices, then click **Next**.

   ![Contact Information form with the email address field](/assets/images/google-oauth-consent-contact-email-2a30b569167c7a8efa745ef831ff854b.png)

6. Review Google's user data policy. If you agree, select the checkbox, then click **Continue** and **Create**.

   ![Finish screen with the user data policy checkbox](/assets/images/google-oauth-consent-create-0eb54a65ebe85f3876521ca04836bf6a.png)

Once Google creates the consent screen, enable the Cloud Identity API in the same project.

## Step 2. Enable the Cloud Identity API[​](#step-2-enable-the-cloud-identity-api "Direct link to Step 2. Enable the Cloud Identity API")

The Auth Service queries this API at sign-in for both direct and nested group memberships.

**Google Cloud Console.** Open the [Cloud Identity API page](https://console.cloud.google.com/apis/library/cloudidentity.googleapis.com), select the same project you used in Step 1, and click **Enable**.

![Cloud Identity API in the Google Cloud Console](/assets/images/google-cloud-identity-api-enable-485aca9af0c0383730c7e00681a4a778.png)

**CLI.** To enable the API from a terminal, replace `<project-id>` with the project ID from Step 1 and run the following commands.

******Terminal

```bash
gcloud services enable cloudidentity.googleapis.com --project=<project-id>
gcloud services list --enabled --project=<project-id> \
    --filter='config.name=cloudidentity.googleapis.com' --format='value(config.name)'
cloudidentity.googleapis.com
```

## Step 3. Create an OAuth client ID[​](#step-3-create-an-oauth-client-id "Direct link to Step 3. Create an OAuth client ID")

1. In **OAuth overview**, click **Create OAuth client**. You can also open **Clients** and click **Create client**.

   ![Create OAuth client button on the Google Auth Platform overview](/assets/images/google-oauth-create-client-591b7b6687d363aeba175b0901c2d787.png)

2. Set these fields.

   * **Application type**: `Web application`
   * **Name**: `Teleport Web Client`

   ![Application type menu with Web application selected](/assets/images/google-oauth-client-type-web-application-0f1e567da6396039afd550415609f2ef.png)

3. Set the URL fields.

   * **Authorized JavaScript origins**: Leave blank.
   * **Authorized redirect URIs**: Click **Add URI** and enter `https://teleport.example.com/v1/webapi/oidc/callback`. Replace `teleport.example.com` with your public Teleport Proxy hostname. Include the port if users connect on a nonstandard port, such as `:3080`. Keep `https://` and omit the trailing slash.

   ![OAuth web client form with the callback URI](/assets/images/google-oauth-authorized-redirect-uri-44efeb418f5c9b4f04097b4fdd832ffb.png)

4. Click **Create**. Save the **Client ID** (ending in `.apps.googleusercontent.com`) and **Client secret** before you close the dialog. Google shows the secret only at creation.

   ![OAuth client created dialog with the client secret redacted](/assets/images/google-oauth-client-id-secret-89495ffdf7bf82047fcb78d545f25ae1.png)

5. In **Clients**, confirm that the new web application appears in the list.

   ![Clients list showing the new web application](/assets/images/google-oauth-clients-list-87cc885fb562e61fb67c3f2ac982bcf8.png)

Use the saved client ID and secret in [Step 6](#step-6-apply-the-teleport-oidc-connector).

Treat the OAuth client secret as a password

Anyone with the client secret can impersonate Teleport to Google's OAuth endpoints. Store it in the same secret manager you use for production credentials. Do not commit it to Git.

## Step 4. Create a service account[​](#step-4-create-a-service-account "Direct link to Step 4. Create a service account")

Google does not include group memberships in the ID token, so Teleport uses a service account to read them from the Cloud Identity API. Create it with the Google Cloud Console or [Terraform](#create-the-service-account-with-terraform).

### Create the service account in the Console[​](#create-the-service-account-in-the-console "Direct link to Create the service account in the Console")

Open **IAM & Admin → Service Accounts**, then click **Create service account**.

![Create service account button in the Google Cloud Console](/assets/images/google-service-account-create-917d3b15c0d16bc8a586acd2a1d98f50.png)

Set **Service account name** to `teleport-group-sync` and click **Create and continue**.

![Google Cloud form for naming the service account](/assets/images/google-service-account-name-f9fd96da70599e6971eceed8a3f53bec.png)

Leave **Permissions** and **Principals with access** blank, then click **Done**. The service account gets its Google Groups access through Workspace domain-wide delegation in Step 5.

Open the service account you just created and go to **Details**. Copy the numeric **Unique ID** (also called *OAuth 2 Client ID*). You will paste it into the Workspace admin console in [Step 5](#step-5-grant-domain-wide-delegation).

![Service account Details tab showing the numeric Unique ID](/assets/images/google-service-account-unique-id-7f1f98f2cb307c8df4d3132a2d7c4553.png)

Open **Keys** and click **Add key**.

![Add key button on the Google Cloud service account Keys tab](/assets/images/google-service-account-add-key-b43a031b7018f47c288677c218b24547.png)

Choose **Create new key**, select **JSON**, then click **Create**.

![Google Cloud service account key dialog with JSON selected](/assets/images/google-service-account-create-json-key-5b6e423a41d2bb4d6553e6782e955662.png)

Save the downloaded key as `google-service-account.json`. You will install it on every Auth Service host in [Step 6](#step-6-apply-the-teleport-oidc-connector).

### Create the service account with Terraform[​](#create-the-service-account-with-terraform "Direct link to Create the service account with Terraform")

In a new private working directory, save the configuration below as `service-account.tf`. It creates the service account and its JSON key. Keep the state, state backups, and exported key out of source control.

service-account.tf

```hcl
terraform {

  required_version = ">= 1.3"



  required_providers {

    google = {

      source  = "hashicorp/google"

      version = ">= 6.0, < 8.0"

    }

  }

}



variable "project_id" {

  description = "Google Cloud project ID"

  type        = string

}



provider "google" {

  project = var.project_id

}



resource "google_service_account" "sso_sync" {

  account_id   = "teleport-group-sync"

  display_name = "Teleport Google Workspace group lookup"

}



resource "google_service_account_key" "sso_sync_key" {

  service_account_id = google_service_account.sso_sync.name

}



output "service_account_client_id" {

  description = "Numeric client ID for Workspace domain-wide delegation"

  value       = google_service_account.sso_sync.unique_id

}



output "google_service_account_json" {

  description = "Service account credentials to install on each Auth Service host"

  value       = base64decode(google_service_account_key.sso_sync_key.private_key)

  sensitive   = true

}
```

If you use local Google credentials, run `gcloud auth application-default login` before running Terraform. Replace `<project-id>` with the project ID from Step 1.

******Terminal

```bash
umask 077
terraform init
terraform apply -var='project_id=<project-id>'
terraform output -raw service_account_client_id
109876543210987654321
terraform output -raw google_service_account_json > google-service-account.json
```

Use the numeric ID in [Step 5](#step-5-grant-domain-wide-delegation). Install `google-service-account.json` in [Step 6](#step-6-apply-the-teleport-oidc-connector).

If Google reports **Service account key creation is disabled** in either the Console or Terraform, a Google Cloud organization policy is blocking JSON keys on this project. Ask your Google Cloud organization administrator whether the project can use a service account key, or see [Google's service account policy troubleshooting](https://docs.cloud.google.com/iam/docs/troubleshoot-org-policies#sa-key-creation-policy).

Treat the service-account JSON as a private key

The file contains an RSA private key. Anyone who reads it can impersonate the service account and, through domain-wide delegation, any Workspace admin you grant it. Store it with the same care you give production SSH private keys.

## Step 5. Grant domain-wide delegation[​](#step-5-grant-domain-wide-delegation "Direct link to Step 5. Grant domain-wide delegation")

Console only

Google requires a Workspace Super Admin to grant domain-wide delegation in the Google Admin console. Terraform and `gcloud` can create the service account, but the Workspace grant is a separate step.

Sign in to the Google Admin console with a dedicated Workspace Super Admin account protected by MFA. Open [Domain-wide delegation](https://admin.google.com/ac/owl/domainwidedelegation) and click **Add new**. Paste:

* **Client ID**: the numeric Unique ID you copied in [Step 4](#step-4-create-a-service-account). Not the OAuth client ID from [Step 3](#step-3-create-an-oauth-client-id), which is a different value.
* **OAuth scopes**: `https://www.googleapis.com/auth/cloud-identity.groups.readonly`

![Domain-wide delegation form with the Cloud Identity scope](/assets/images/google-workspace-domain-wide-delegation-42b12c060755639ac0eae1c52db8070b.png)

Click **Authorize**. In the delegation list, find the numeric client ID and open **View details**. Confirm that it lists `https://www.googleapis.com/auth/cloud-identity.groups.readonly`. If your organization uses multi-party approval, another Super Admin must approve the request. Teleport uses this scope to read groups as the Workspace user named in `google_admin_email` in [Step 6](#step-6-apply-the-teleport-oidc-connector).

The delegated admin is not the service account

The `google_admin_email` on the connector must be the email of a real Workspace admin user (for example, `admin@example.com`), not the `...@project.iam.gserviceaccount.com` email of the service account itself. The service account impersonates that admin to read groups. Without a real admin identity to impersonate, the API call fails with an `unauthorized_client` error.

## Step 6. Apply the Teleport OIDC connector[​](#step-6-apply-the-teleport-oidc-connector "Direct link to Step 6. Apply the Teleport OIDC connector")

From the workstation where you saved `google-service-account.json` in [Step 4](#step-4-create-a-service-account), copy the key to each Auth Service host over SSH. Replace `operator@auth.example.com` with the SSH user and address for that host.

******Terminal

```bash
chmod 0600 ./google-service-account.json
scp -p ./google-service-account.json operator@auth.example.com:google-service-account.json
```

On each Auth Service host, install the key at the same path with restricted permissions, then remove the staging copy from the SSH user's home directory.

******Terminal

```bash
sudo install -o root -g root -m 0600 \
    "$HOME/google-service-account.json" /etc/teleport/google-service-account.json
rm -f "$HOME/google-service-account.json"
```

In a multi-node Auth Service cluster, every host needs an identical key at this exact path. The instance that handles a login reads the file locally, so a missing or stale copy on one replica causes intermittent login failures.

On Kubernetes, mount the JSON as a Secret at `/etc/teleport/google-service-account.json` in every Auth Service pod and make it readable by the Auth Service process.

Write the Teleport `kind: oidc` (`version: v3`) connector manifest as `teleport-connector.yaml`:

teleport-connector.yaml

```yaml
kind: oidc

version: v3

metadata:

  name: google

spec:

  display: Google Workspace

  issuer_url: https://accounts.google.com

  client_id: <oauth-client-id>.apps.googleusercontent.com

  client_secret: <oauth-client-secret>

  redirect_url: https://teleport.example.com/v1/webapi/oidc/callback

  google_admin_email: admin@example.com

  google_service_account_uri: /etc/teleport/google-service-account.json

  claims_to_roles:

    - claim: groups

      value: devops@example.com

      roles:

        - access
```

Replace:

* `client_id` and `client_secret` with the OAuth credentials from [Step 3](#step-3-create-an-oauth-client-id).
* `redirect_url` with the exact callback URI configured in Step 3.
* `google_admin_email` with a real Workspace admin email (see the warning in [Step 5](#step-5-grant-domain-wide-delegation)).
* `claims_to_roles` with your Google Group primary email addresses and existing Teleport roles. **Google Groups are matched by full email address**, not by display name.

Apply the connector from your authenticated Teleport admin terminal:

******Terminal

```bash
tctl create -f teleport-connector.yaml
authentication connector "google" has been created
```

## Step 7. Verify login with tsh[​](#step-7-verify-login-with-tsh "Direct link to Step 7. Verify login with tsh")

Confirm that the connector exists on your Teleport cluster:

******Terminal

```bash
tctl get oidc/google
kind: oidc
version: v3
metadata:
  name: google
...
```

Keep your administrative terminal open. From a second terminal window, sign in as a direct member of a mapped Google Group. This tests the connector and role mapping without nested-group resolution. If you use nested groups, repeat the test with a nested member after the direct login succeeds:

******Terminal

```bash
tsh login --proxy=teleport.example.com --auth=google
If browser window does not open automatically, open it by clicking on the link:
 http://127.0.0.1:52764/9b47d2a1-...
> Profile URL:        https://teleport.example.com:443
  Logged in as:       alice@example.com
  Cluster:            teleport.example.com
  Roles:              access
  Valid until:        2026-12-01 03:14:07 +0000 UTC
```

Confirm that `Roles` shows the role you mapped in Step 6. If the test user reaches Google but Teleport denies the login, inspect the failed `user.login` event in the Teleport audit log before changing the connector. Also verify that an account outside the mapped group is denied access.

## Google SSO for Teleport Community Edition[​](#google-sso-for-teleport-community-edition "Direct link to Google SSO for Teleport Community Edition")

Google Workspace SSO requires Teleport Enterprise. If you follow this guide on a Teleport Community Edition cluster, applying the OIDC connector in Step 6 returns:

text

```text
ERROR: OIDC is only available in Teleport Enterprise
```

This is a licensing restriction, not a configuration issue. Teleport Community Edition does not support Google Workspace SSO, and there is no configuration flag that enables OIDC. If you are running Community Edition, you can upgrade to Teleport Enterprise, implement OIDC in your own fork, or explore alternatives that include corporate SSO without an Enterprise subscription.

### Upgrade to Teleport Enterprise

Upgrading to Teleport Enterprise is the officially supported way to enable Google Workspace SSO on your existing Teleport cluster.

How much does Teleport Enterprise cost for SSO?

According to [Vendr](https://www.vendr.com/marketplace/teleport), a software procurement and pricing intelligence platform, the **median annual Teleport contract is $50,950/year**, with reported contracts reaching **$137,119/year** (156 purchases, February 2026). These figures reflect total contract values, not the standalone cost of SSO.

If Teleport Community Edition already meets your infrastructure access requirements and Google Workspace SSO is your only reason to upgrade, consider whether an Enterprise subscription is worth the cost.

Upgrading to self-hosted Teleport Enterprise also requires more than applying a license key. As documented in Teleport's [Linux installation guide](https://goteleport.com/docs/installation/linux/), Community Edition and Enterprise are distributed as separate builds. For package-based deployments, you will need to replace `teleport` with `teleport-ent` and maintain a valid Enterprise license.

### Maintain a custom Teleport fork

Another option is to fork Teleport's AGPLv3-licensed codebase and implement your own Google Workspace OIDC connector. Give Claude Code, Codex, or Google Antigravity the codebase and a well-crafted prompt, and you might have a working connector in minutes.

The real work begins with the next upstream release. Your team becomes responsible for upstream merges, security backports, authentication testing, and building and distributing custom binaries across your infrastructure. AGPLv3 copyleft obligations come bundled, too. Corporate legal loves AGPLv3. Especially when you fork it.

### Consider an alternative to Teleport

[AlmaForge](https://almaforge.com/index.md) includes [Google Workspace SSO](https://almaforge.com/sso/google.md) and Google Groups role mapping in [AlmaForge Free](https://almaforge.com/pricing.md). It also supports [Okta](https://almaforge.com/sso/okta.md), [Microsoft Entra ID](https://almaforge.com/sso/microsoft.md), Keycloak, and other [OIDC providers](https://almaforge.com/sso/oidc.md).

The platform uses short-lived certificates, reverse tunnels, [label-based RBAC](https://almaforge.com/rbac.md), session playback, and [audit logs](https://almaforge.com/reference/audit.md). It also includes [just-in-time access requests](https://almaforge.com/just-in-time-access.md), ChatOps integrations, and a [kubectl-style CLI](https://almaforge.com/cli.md).

You can reuse the OAuth client, service account, and domain-wide delegation from this guide for an evaluation. Use dedicated credentials in production.

Reuse your Google Workspace SSO configuration with AlmaForge

Add `https://<almaforge-proxy>/api/v1/oidc/callback` to your OAuth client's **Authorized redirect URIs** and apply the corresponding SSO connector:

Teleport Enterprise (teleport-connector.yaml)

```yaml
kind: oidc

version: v3

metadata:

  name: google

spec:

  display: Google Workspace

  issuer_url: https://accounts.google.com

  client_id: <oauth-client-id>.apps.googleusercontent.com

  client_secret: <oauth-client-secret>

  redirect_url: https://teleport.example.com/v1/webapi/oidc/callback

  google_admin_email: admin@example.com

  google_service_account_uri: /etc/teleport/google-service-account.json

  claims_to_roles:

    - claim: groups

      value: devops@example.com

      roles:

        - access
```

AlmaForge Free & Enterprise (google.yaml)

```yaml
# Google Workspace connector with Cloud Identity group lookup.

apiVersion: almaforge.com/v1

kind: OIDCConnector

metadata:

  name: google

spec:

  display: Google

  issuerURL: https://accounts.google.com

  clientID: <oauth-client-id>

  clientSecret: <oauth-client-secret>

  # Use a Workspace admin who can read group memberships. The service account

  # acts as this user during sign-in.

  googleAdminEmail: admin@example.com

  googleServiceAccount: ${file:/etc/almaforge/google-sa.json}

  # Use the group's primary email under value and list existing AlmaForge roles.

  # Members of the group receive those roles at sign-in.

  claimsToRoles:

    - claim: groups

      value: admins@example.com

      roles: [admin, access]

    - claim: groups

      value: developers@example.com

      roles: [access]
```

Teleport Enterprise (tctl + tsh)

```bash
tctl create -f teleport-connector.yaml
tsh login --proxy=teleport.example.com --auth=google
```

AlmaForge Free & Enterprise (alma)

```bash
alma apply -f google.yaml
alma login --proxy=almaforge.example.com
```

Download [`google.yaml`](https://almaforge.com/examples/sso/google-workspace/almad.d/google.yaml).

AlmaForge derives the OIDC callback URL automatically and uses the same Google Cloud Identity API and domain-wide delegation scope as Teleport. Your existing Google Groups remain the source of infrastructure access policy.

Already configured Google Workspace? Spin up an AlmaForge cluster in ten minutes, reuse your Google Cloud configuration, and test SSO with your existing Google Groups. Run it alongside Teleport without touching your production cluster. If it fits your requirements, follow the migration guide when you are ready.

## Further reading[​](#further-reading "Direct link to Further reading")

* [AlmaForge for Teleport users: migrate with a side-by-side deployment.](https://almaforge.com/migrate/teleport.md)
* [Configure Google Workspace SSO in AlmaForge.](https://almaforge.com/sso/google.md)
* [Run a local AlmaForge cluster in ten minutes.](https://almaforge.com/quickstart.md)
* [Compare AlmaForge Free and Enterprise editions.](https://almaforge.com/pricing.md)

***

### Disclaimer

Teleport and other third-party trademarks are the property of their respective owners and are used solely for identification and comparison. AlmaForge is not affiliated with, sponsored by, or endorsed by Teleport or its owners. This guide reflects publicly available information reviewed as of December 2026. Product features, pricing, and licensing are subject to change.
