Skip to content
LogoLogo

Set up SSO with Google Workspace (OIDC)

For the IT admin who received a SaaSLayer SSO setup link. You create an OAuth client in Google Cloud, paste its values into the setup page, prove your Workspace domain and activate. Plan on about 10 minutes.

Status: Supported. Tested end to end with Google Workspace (Workspace domain sign-in in a browser, hosted refresh). Google sends no groups. Names are provisional until the SSO naming review.

What the setup page gives you

Open the setup link. Under Identity provider → Register these in your identity provider it shows:

ValueExampleWhere it goes in Google Cloud
Redirect URIhttps://auth.yourapp.saaslayer-cloud.com/oauth2/idpresponseThe OAuth client's Authorized redirect URIs

The host is the app's branded sign-in host: auth.<app>.saaslayer-cloud.com, or the app's own domain such as auth.yourapp.com. Copy the value from the setup page exactly. If the app moves to another sign-in host later, its owner sends you the new value: add it beside this one, and remove the old one only when they confirm the move.

Under Domains it shows one DNS TXT record per email domain, for example:

_saaslayer-sso.acme.com  TXT  "saaslayer-sso-verification=<token>"

1. Create the OAuth client

In the Google Cloud console, in a project owned by your Workspace organization:

  1. Google Auth Platform → Branding (or APIs & Services → OAuth consent screen): set it up with Audience Internal, so only your Workspace's people can use it.
  2. Google Auth Platform → Clients → Create client (or APIs & Services → Credentials → Create credentials → OAuth client ID).
    • Application type: Web application.
    • Authorized redirect URIs: the Redirect URI from the setup page.
    • Create.
  3. Copy the Client ID and Client secret.

2. Fill in the setup page

Under Identity provider settings, enter your values. The fields may be empty: the connection can start blank, with only the protocol chosen. Replace any values already there with yours:

FieldValue
Issuer URLhttps://accounts.google.com
Client IDThe OAuth client ID.
Client secretThe client secret. It is stored write-only and never shown again.
User id sourcesub (Okta, Google, most providers). Google's sub is numeric and immutable.

Click Save identity provider.

3. Prove your domain

Under Domains, add your Workspace domain. Publish the TXT record it shows at your DNS provider, then click Check DNS for <domain>.

Google signs the Workspace domain into its hd claim. A sign-in is accepted only when both the email and hd are in a verified domain of this connection. A personal Gmail account or another Workspace is refused (domain-mismatch). So is a personal Google account created with a work address, which has no hd (hosted-domain-unverified).

4. Activate and test

Click Finish setup and activate. The button stays disabled, and the page lists what is missing, until the issuer, the client ID and the client secret are saved. Then sign in with a Workspace account: use Test sign-in when the page offers it, else open the app's sign-in page and enter your work email. Google's account chooser opens straight away, with no SaaSLayer or Cognito screen in between.

No groups

Google sends no groups, and Google directory sync is not in this release. The token's sso_groups is an empty, complete list. Access for these people comes from grants the app's admins make, never from groups or a group mapping's default.

Google's account chooser and consent screen show the OAuth app's branding. Under Google Auth Platform → Branding (or APIs & Services → OAuth consent screen):

  • App name: the app's name, as your people know it.
  • User support email: your IT team's address.
  • App logo: the app's logo (square, 120 × 120 pixels for best results, up to 1 MB).
  • Application home page: the app's address, and under Authorized domains that address's domain (for example yourapp.com).

With Audience Internal, Google shows the name and logo to your Workspace's people without verification. An External app that shows a logo needs Google's brand verification first, including proof that you own its authorized domains, so keep the client Internal.

If it fails

See SSO troubleshooting. The usual Google causes:

  • redirect_uri_mismatch on Google's page: the redirect URI in the OAuth client differs from the setup page's.
  • domain-mismatch: a personal Gmail account, another Workspace, or a domain not yet verified on this connection.
  • hosted-domain-unverified: a personal Google account that uses a work address; sign in with the Workspace account.
  • org_internal on Google's page: the account is outside the Workspace that owns an Internal client.