Skip to main content

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​

Teleport cluster​

Verify the edition your cluster runs from your workstation:

Terminal
tctl statusCluster      teleport.example.comVersion      19.0.0

Then check the server binary on an Auth Service host:

Terminal
teleport versionTeleport 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 for your options (upgrading to Enterprise, maintaining a fork, or switching to AlmaForge).

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​

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 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​

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
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.

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.

    Google Cloud search result for Google Auth Platform

  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.

    Get started on the Google Auth Platform overview

  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

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

    Audience form with Internal selected

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

    Contact Information form with the email address field

  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

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

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, select the same project you used in Step 1, and click Enable.

Cloud Identity API in the Google Cloud Console

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

Terminal
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​

  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

  2. Set these fields.

    • Application type: Web application
    • Name: Teleport Web Client

    Application type menu with Web application selected

  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

  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

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

    Clients list showing the new web application

Use the saved client ID and secret in Step 6.

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​

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 in the Console​

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

Create service account button in the Google Cloud Console

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

Google Cloud form for naming the service account

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.

Service account Details tab showing the numeric Unique ID

Open Keys and click Add key.

Add key button on the Google Cloud service account Keys tab

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

Google Cloud service account key dialog with JSON selected

Save the downloaded key as google-service-account.json. You will install it on every Auth Service host in Step 6.

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
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
umask 077terraform initterraform apply -var='project_id=<project-id>'terraform output -raw service_account_client_id109876543210987654321terraform output -raw google_service_account_json > google-service-account.json

Use the numeric ID in Step 5. Install google-service-account.json in Step 6.

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.

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​

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 and click Add new. Paste:

  • Client ID: the numeric Unique ID you copied in Step 4. Not the OAuth client ID from Step 3, 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

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.

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​

From the workstation where you saved google-service-account.json in Step 4, 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
chmod 0600 ./google-service-account.jsonscp -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
sudo install -o root -g root -m 0600 \    "$HOME/google-service-account.json" /etc/teleport/google-service-account.jsonrm -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
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.
  • 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).
  • 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
tctl create -f teleport-connector.yamlauthentication connector "google" has been created

Step 7. Verify login with tsh​

Confirm that the connector exists on your Teleport cluster:

Terminal
tctl get oidc/googlekind: oidcversion: v3metadata:  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
tsh login --proxy=teleport.example.com --auth=googleIf 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 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
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, 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, 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 includes Google Workspace SSO and Google Groups role mapping in AlmaForge Free. It also supports Okta, Microsoft Entra ID, Keycloak, and other OIDC providers.

The platform uses short-lived certificates, reverse tunnels, label-based RBAC, session playback, and audit logs. It also includes just-in-time access requests, ChatOps integrations, and a kubectl-style CLI.

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)
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)
# 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)
tctl create -f teleport-connector.yamltsh login --proxy=teleport.example.com --auth=google
AlmaForge Free & Enterprise (alma)
alma apply -f google.yamlalma login --proxy=almaforge.example.com

Download 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​


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.