# Google Workspace fixes

<!-- Generated by scripts/generate.ts. Do not edit. -->

Fix steps for failed Google Workspace tests and sign-ins. For setup, see the [Google Workspace guides](/idp-guides/google-workspace/).

## Connection Doctor fixes

Connection Doctor shows these steps when a test or sign-in through Google Workspace fails. Codes without their own Google Workspace steps use the [generic fixes](/idp-guides/generic/). Values in braces are filled in with the connection's own settings in the dashboard and portal.

<a id="oidc_email_missing"></a>

### Fix for `oidc_email_missing`

The identity provider did not release the user's email claim.

1. Make sure the user's Google account has an email address; the email scope is requested automatically.

See the [`oidc_email_missing` error reference](/errors/oidc_email_missing/).

<a id="oidc_idp_error"></a>

### Fix for `oidc_idp_error`

The identity provider returned an error to the sign-in callback instead of signing the user in (most often the user is not assigned to the application, or canceled).

1. In the Google Admin console, open Security > Access and data control > API controls > Manage third-party app access and make sure the OAuth client is allowed for the user's organizational unit; in the Google Cloud console, check that the OAuth consent screen allows the user (Internal, or the user is a test user).

See the [`oidc_idp_error` error reference](/errors/oidc_idp_error/).

<a id="oidc_personal_account_refused"></a>

### Fix for `oidc_personal_account_refused`

A personal Google or Microsoft account signed in, and this connection only accepts work accounts.

1. Ask the user to sign in with their Google Workspace account (name@your-domain), not a personal gmail.com account.

See the [`oidc_personal_account_refused` error reference](/errors/oidc_personal_account_refused/).

<a id="oidc_tenant_mismatch"></a>

### Fix for `oidc_tenant_mismatch`

The account signed in from a Google Workspace domain or Microsoft Entra tenant that is not the one this organization verified.

1. In the Google Admin console, open Account > Domains > Manage domains and check that the user's primary domain is the domain verified in this setup.

See the [`oidc_tenant_mismatch` error reference](/errors/oidc_tenant_mismatch/).

<a id="oidc_token_exchange_failed"></a>

### Fix for `oidc_token_exchange_failed`

The identity provider refused to exchange the sign-in code (often a wrong client secret or redirect URI).

1. In the Google Cloud console, open APIs & Services > Credentials > the OAuth client and add `{redirect_uri}` to Authorized redirect URIs; check the client secret.

See the [`oidc_token_exchange_failed` error reference](/errors/oidc_token_exchange_failed/).

<a id="saml_audience_mismatch"></a>

### Fix for `saml_audience_mismatch`

The identity provider uses a different SP Entity ID (Audience) than this connection's.

1. In the Google Admin console, open the SAML app > Service provider details and set Entity ID to `{sp_entity_id}`.

See the [`saml_audience_mismatch` error reference](/errors/saml_audience_mismatch/).

<a id="saml_destination_mismatch"></a>

### Fix for `saml_destination_mismatch`

The identity provider sends the response to a different address than this connection's.

1. In the Google Admin console, open the SAML app > Service provider details and set ACS URL to `{acs_url}`.

See the [`saml_destination_mismatch` error reference](/errors/saml_destination_mismatch/).

<a id="saml_email_missing"></a>

### Fix for `saml_email_missing`

The response does not include the user's email address.

1. In the Google Admin console, open the SAML app > Attribute mapping and map Primary email to the app attribute email.

See the [`saml_email_missing` error reference](/errors/saml_email_missing/).

<a id="saml_idp_status_error"></a>

### Fix for `saml_idp_status_error`

The identity provider refused the sign-in before sending an assertion.

1. In the Google Admin console, open Apps > Web and mobile apps > the app > User access and turn it ON for the user's organizational unit or group.

See the [`saml_idp_status_error` error reference](/errors/saml_idp_status_error/).

<a id="saml_issuer_mismatch"></a>

### Fix for `saml_issuer_mismatch`

The response comes from a different identity provider (issuer) than the one configured here.

1. In the Google Admin console, download the SAML app's metadata and upload it here; the issuer is the "Entity ID" shown in Google identity provider details.

See the [`saml_issuer_mismatch` error reference](/errors/saml_issuer_mismatch/).

<a id="saml_nameid_missing"></a>

### Fix for `saml_nameid_missing`

The response has no user identifier (NameID).

1. In the Google Admin console, open the SAML app > Service provider details and set Name ID to Basic Information > Primary email.

See the [`saml_nameid_missing` error reference](/errors/saml_nameid_missing/).

<a id="saml_signature_invalid"></a>

### Fix for `saml_signature_invalid`

The signature does not match the identity provider certificate we have on file (often after a certificate change).

1. In the Google Admin console, open the SAML app > Download metadata (or the certificate) and upload it here.

See the [`saml_signature_invalid` error reference](/errors/saml_signature_invalid/).
