Federated authentication and SSO troubleshooting¶
This topic provides information to help troubleshoot a federated authentication environment, including the error codes and messages that are generated during an unsuccessful user login attempt.
Password-related errors¶
A user with an expired Snowflake password cannot log in with SSO even though they are not using the password. This behavior is intentional and prevents someone from logging in using expired credentials.
SSO logins are also rejected if an administrator set the MUST_CHANGE_PASSWORD parameter to TRUE when creating the user, but the user
has not changed the password yet.
Error codes¶
Errors are generated for each failed login attempt. These errors can be obtained from the Snowflake Information Schema or the ACCOUNT_USAGE schema:
- The Snowflake Information Schema provides data from within the past 7 days and can be queried using the LOGIN_HISTORY , LOGIN_HISTORY_BY_USER table functions.
- The LOGIN_HISTORY view in the ACCOUNT_USAGE schema provides similar data from within the past year.
Federated authentication error codes¶
The table below contains error codes and messages related to federated authentication that are not specific to SAML or OIDC. For protocol-specific codes, see SAML error codes and OIDC error codes.
| Error Code | Error | Description |
|---|---|---|
| 390136 | FED_REAUTH_PENDING | Authentication response is pending from IDP. |
| 390137 | FED_REAUTH | Federated authentication request URL is generated. |
| 390138 | FED_REAUTH_TIMEOUT | Timeout waiting for authentication response from IDP. |
| 390139 | AUTHENTICATOR_NOT_SUPPORTED | The specified authenticator is not accepted by your Snowflake account configuration. Please contact your local system administrator to get the correct URL to use. |
| 390140 | FED_PASSWORD_EXPIRED | Identity Provider (IdP) password has expired. Contact your IdP team. |
| 390191 | USERNAMES_MISMATCH | The user you were trying to authenticate as differs from the user currently logged in at the IDP. |
SAML error codes¶
Troubleshooting a login failure differs depending on whether the error message has an UUID.
If you encounter an error message associated with a failed SAML SSO login attempt, and the error message does not have a UUID, then ensure the user exists. If the user exists, then the SAML response is invalid and the number of login attempts is too high.
If you encounter an error message associated with a failed SAML SSO login attempt, and the error message has a UUID, you can ask an administrator that has MONITOR privilege assigned to their role to get a more detailed description of the error by following the steps below:
-
Find the UUID in the error message:
-
Use the UUID as an argument to the SYSTEM$GET_LOGIN_FAILURE_DETAILS function, and extract the error using the JSON_EXTRACT_PATH_TEXT function:
-
Find the error description in the table below:
| Error code | Error | Description |
|---|---|---|
| 390133 | SAML_RESPONSE_INVALID | The SAML response was invalid for an unspecified reason, although it is most likely malformed (this is also used if there is an error on parsing). |
| 390165 | SAML_RESPONSE_INVALID_SIGNATURE | The SAML response contains an invalid Signature. |
| 390166 | SAML_RESPONSE_INVALID_DIGEST_METHOD | The SAML response contains an invalid “DigestMethod” attribute or omits it entirely. |
| 390167 | SAML_RESPONSE_INVALID_SIGNATURE_METHOD | The SAML response contains an invalid “SignatureMethod” or omits it entirely. |
| 390168 | SAML_RESPONSE_INVALID_DESTINATION | The “Destination” attribute in the SAML response does not match a valid destination URL on the account. |
| 390169 | SAML_RESPONSE_INVALID_AUDIENCE | The SAML response does not contain exactly one audience or the audience URL does not match what we expect the audience URL to be. |
| 390170 | SAML_RESPONSE_INVALID_MISSING_INRESPONSETO | The “InResponseTo” attribute in the SAML assertion is missing. |
| 390171 | SAML_RESPONSE_INVALID_RECIPIENT_MISMATCH | The “Recipient” attribute does not match a valid destination URL. |
| 390172 | SAML_RESPONSE_INVALID_NOTONORAFTER_VALIDATION | This typically indicates that the time in which the SAML assertion is valid has expired. |
| 390173 | SAML_RESPONSE_INVALID_NOTBEFORE_VALIDATION | This typically indicates that the time in which the SAML assertion is valid has not yet come. |
| 390174 | SAML_RESPONSE_INVALID_USERNAMES_MISMATCH | The login names do not match during re-authentication. |
| 390175 | SAML_RESPONSE_INVALID_SESSIONID_MISSING | During re-authentication, we were unable to find a session corresponding to the user. |
| 390176 | SAML_RESPONSE_INVALID_ACCOUNTS_MISMATCH | During re-authentication, the names of the accounts were found to not match. |
| 390177 | SAML_RESPONSE_INVALID_BAD_CERT | The x.509 certificate contained in the SAML response is either malformed or does not match the expected certificate. |
| 390178 | SAML_RESPONSE_INVALID_PROOF_KEY_MISMATCH | The proof keys do not match with respect to the authentication request ID. |
| 390179 | SAML_RESPONSE_INVALID_INTEGRATION_MISCONFIGURATION | The SAML IdP configuration is invalid. |
| 390180 | SAML_RESPONSE_INVALID_REQUEST_PAYLOAD | During authentication, using an invalid payload or using an invalid federated OAuth connection string. |
| 390181 | SAML_RESPONSE_INVALID_MISSING_SUBJECT_CONFIRMATION_BEARER | The Subject confirmation with Bearer method is missing and cannot be validated. |
| 390182 | SAML_RESPONSE_INVALID_MISSING_SUBJECT_CONFIRMATION_DATA | The Subject confirmation data is missing in the assertion. |
| 390183 | SAML_RESPONSE_INVALID_CONDITIONS | The SAML assertion is not valid for a reason that is different than the preceding conditions in this table. |
| 390184 | SAML_RESPONSE_INVALID_ISSUER | The SAML Response contained an issuer/entityID value different from the one configured in the SAML IDP Configuration. |
OIDC error codes¶
The table below contains error codes related to OIDC federated authentication. For configuration guidance, see Configuring OpenID Connect (OIDC) federated authentication. For troubleshooting steps, see OIDC troubleshooting.
Note
A failed OIDC login shows the end user a generic error message, not a numeric code; these codes are surfaced to administrators. Codes 390250 through 390253 are top-level failure codes; codes 390254 through 390259 are internal detail codes that an administrator retrieves by passing the login’s event UUID to SYSTEM$GET_LOGIN_FAILURE_DETAILS. (390264 is recorded as 390252.)
| Error code | Error | Description |
|---|---|---|
| 390250 | OIDC_INTEGRATION_DISABLED | The OIDC integration is disabled or could not be found. |
| 390251 | OIDC_REQUEST_INVALID | The authorization request is missing required data or contains invalid parameters. |
| 390252 | OIDC_RESPONSE_INVALID | The IdP response is invalid or the user could not be resolved in Snowflake. |
| 390253 | OIDC_TOKEN_INVALID | General ID token validation failure. |
| 390254 | OIDC_TOKEN_EXPIRED | The ID token has expired (the exp claim is in the past) or was issued too long ago (stale iat). |
| 390255 | OIDC_TOKEN_INVALID_ISSUER | The iss claim in the ID token does not match the configured OIDC_ISSUER. |
| 390256 | OIDC_TOKEN_INVALID_AUDIENCE | The aud claim in the ID token does not contain the configured OIDC_CLIENT_ID, or, when the azp claim is present in a multi-audience token, azp does not match OIDC_CLIENT_ID. |
| 390257 | OIDC_TOKEN_INVALID_NONCE | The nonce claim does not match the expected value. This may indicate a token replay attack. |
| 390258 | OIDC_TOKEN_INVALID_SIGNATURE | The ID token signature could not be verified against the IdP’s JWKS keys. |
| 390259 | OIDC_INTEGRATION_MISCONFIGURATION | The integration is missing required configuration (for example, endpoints or credentials). |
| 390264 | OIDC_MULTIPLE_MATCHING_USERS | Multiple Snowflake users with a verified email share the token’s email address, so a unique user can’t be resolved. |
| 390322 | IFF_USER_MISMATCH | The identifier typed at the identifier-first login prompt doesn’t match the user resolved from the IdP token. OIDC reuses this shared identifier-first login code (also used by SAML). |
OIDC troubleshooting¶
The sections below describe common OIDC configuration and login issues. For error code definitions, see OIDC error codes.
Common issues¶
Users can’t see the OIDC login button on the Snowflake login page.
- Verify the integration is enabled:
DESC SECURITY INTEGRATION <integration_name>;and confirm thatENABLEDisTRUE. - Verify
OIDC_ENABLE_SSO_LOGIN_PAGEisTRUE. - Verify
OIDC_LOGIN_PAGE_LABELis set (otherwise the integration name is used as the label). - If the user has an authentication policy attached, verify that the policy’s
AUTHENTICATION_METHODSincludesOIDC(orALL), and thatSECURITY_INTEGRATIONSeither includes this integration or is empty. - If
ALLOWED_USER_DOMAINSorALLOWED_EMAIL_PATTERNSis set, verify that the user’s email domain or address matches.
A driver or client login with authenticator=externalbrowser doesn’t use OIDC.
This is expected. OIDC isn’t available through the external-browser authenticator, which supports SAML 2.0 only. For driver SSO, use
authenticator=OAUTH_AUTHORIZATION_CODE with an OIDC integration, or configure a SAML 2.0 integration. See
Supported sign-in surfaces.
Authentication fails with a generic “incorrect username or password” error after IdP login.
Snowflake deliberately returns the same generic error (390100) whether the password was wrong or the OIDC user couldn’t be resolved. This
covers several user-resolution failure modes. Inspect the IdP token contents to narrow the cause:
-
Verify the token claim value matches a Snowflake user attribute.
-
Run
DESC SECURITY INTEGRATION <integration_name>;to confirm theOIDC_TOKEN_USER_MAPPING_CLAIMandOIDC_SNOWFLAKE_USER_MAPPING_ATTRIBUTEsettings. -
Verify the Snowflake user exists with the expected
LOGIN_NAMEorEMAIL_ADDRESS: -
If the user typed a login name or email at the identifier-first prompt that doesn’t resolve to the same Snowflake user as the IdP-returned claim, the login fails with
390322(IFF_USER_MISMATCH), a code shared with SAML. -
If
ALLOWED_USER_DOMAINSorALLOWED_EMAIL_PATTERNSis set, verify that the resolved claim value matches.
Authentication fails for a user with email-based mapping even though the user exists.
The user’s email might not be verified. Email-based mapping requires a verified email, and an unverified email fails as an unresolved user
(the generic 390100 error) with no dedicated code to grep for. Verify the user’s email, or verify their email domain. See
Verified email requirement.
Authentication fails when a token email matches multiple Snowflake users.
When more than one Snowflake user has a verified email matching the token’s email address, Snowflake can’t resolve a unique user and the login
fails. The end user sees the generic sign-in error; check LOGIN_HISTORY to identify this cause.
Ensure each email maps to a single user, or use LOGIN_NAME mapping. For the corresponding error code, see
OIDC error codes.
Detail code OIDC_TOKEN_INVALID_ISSUER (390255). Custom providers only.
Ensure the OIDC_ISSUER value exactly matches the iss claim in the ID token issued by your IdP. For managed providers
(OIDC_PROVIDER='GOOGLE'), Snowflake validates the issuer internally; contact Snowflake Support if this error persists.
Detail code OIDC_TOKEN_INVALID_AUDIENCE (390256). Custom providers only.
- Ensure the
OIDC_CLIENT_IDmatches theaudclaim in the ID token issued by your IdP. - If your IdP issues tokens with multiple audience values, the
azp(authorized party) claim must match theOIDC_CLIENT_ID.
For managed providers (OIDC_PROVIDER='GOOGLE'), Snowflake validates audience internally; contact Snowflake Support if this error persists.
Detail code OIDC_TOKEN_INVALID_NONCE (390257).
This error indicates a possible token replay or session-state issue. The user should retry the login. If the error persists, verify that your IdP correctly echoes the nonce parameter back in the ID token.
Detail code OIDC_TOKEN_EXPIRED (390254).
The ID token has expired (the exp claim is in the past) or was issued too long ago (stale iat). The user should re-authenticate at the
IdP and try again.
Endpoint discovery fails during integration creation.
- Verify the issuer URL is correct and accessible from Snowflake.
- Verify the IdP publishes a
.well-known/openid-configurationdocument. - Alternatively, provide all three required endpoints (
OIDC_AUTHORIZATION_ENDPOINT,OIDC_TOKEN_ENDPOINT,OIDC_JWKS_URI) explicitly to skip discovery.
Domain or email pattern restrictions block valid users.
- Verify the
ALLOWED_USER_DOMAINSorALLOWED_EMAIL_PATTERNSvalues include the user’s email domain. - The domain/email check uses the same token claim that resolved the user. If the configured claim doesn’t contain an email address, domain filtering may unexpectedly fail.
- Email patterns use Java
Pattern.find()semantics. If you want full-string matching, anchor your regex with^...$.