What you will be able to do
- Describe the parts of a Snowflake federated environment and choose between SAML 2.0 and OIDC
- Configure an IdP and a SAML2 security integration, including NameID-to-login_name mapping
- Set the right user TYPE for people and services
- Create and apply password policies, and reset passwords
- Manage MFA enrollment, bypass MFA temporarily, and report on users without MFA
- Compare Snowflake OAuth with External OAuth, configure a Snowflake OAuth integration for a custom client, and explain how network policies, private connectivity and SSO affect the OAuth flow
Key concept
Federated authentication (SSO) — Snowflake acts as the service provider. An external identity provider checks the user's credentials and passes the result to Snowflake, so signing in is handled outside Snowflake while access is still controlled inside it.
1.Federated authentication: SP, IdP, SAML and OIDC
A federated environment has two roles. Snowflake is the service provider (SP). The identity provider (IdP) creates and stores user credentials and authenticates users for SSO into Snowflake. Snowflake supports two protocols for this, each configured as its own security integration: SAML 2.0 (TYPE = SAML2) and OpenID Connect (TYPE = OIDC).
Okta and Microsoft Entra ID have native Snowflake support. Most other SAML 2.0-compliant vendors also work, for example Google Workspace, OneLogin and Ping Identity PingOne, but with those you have to define a custom application for Snowflake in the IdP. On the OIDC side, Snowflake manages the client configuration for Google and Microsoft. With any other OIDC provider, you register an application in that IdP and give Snowflake its client credentials.
| Aspect | OIDC | SAML 2.0 |
|---|---|---|
| Integration type | TYPE = OIDC | TYPE = SAML2 |
| Token format | JWT (JSON Web Token) | XML assertion |
| Credential type | Client ID + Client Secret | X.509 certificate |
| Authentication-policy method | AUTHENTICATION_METHODS = ('OIDC') | AUTHENTICATION_METHODS = ('SAML') |
| Driver SSO with authenticator=externalbrowser | Not supported (use OAUTH_AUTHORIZATION_CODE) | Supported |
| Client Redirect (custom providers) | Not supported | Supported via SAML2_SNOWFLAKE_OTHER_ACS_URLS |
A login can start in either place. In a Snowflake-initiated login, the user picks the IdP on the Snowflake sign-in page. In an IdP-initiated login, the user opens the Snowflake application from the IdP's portal. Logging out behaves differently from logging in. Snowflake never performs a global logout, so when a user signs out of one Snowflake session, their other Snowflake sessions and their IdP session stay open. You can also give different users different IdPs. Among the drivers, only JDBC, ODBC and Python currently support multiple IdPs.
Checkpoint 1 of 7· Check yourself
A team wants driver-based SSO with authenticator=externalbrowser. Which federated setup supports that?
Only SAML 2.0 supports authenticator=externalbrowser. For driver SSO with OIDC, use OAUTH_AUTHORIZATION_CODE instead.
“Not supported (use authenticator=OAUTH_AUTHORIZATION_CODE for driver OIDC SSO)”Source: docs.snowflake.com
Sources1
2.Configuring the IdP and the SAML2 security integration
Setting up SAML SSO takes work on both sides. In the IdP (Okta, for example): create a user for each person who needs access, including an email address. Then create a Snowflake application whose SubDomain is your account identifier, with privatelink appended if you use private connectivity, and assign the users to it. Identity mapping is the part that most often breaks logins: the email address in the IdP has to match the Snowflake user's login_name, and it has to match the SAML NameID. Unless you set SAML2_REQUESTED_NAMEID_FORMAT, Snowflake requests the emailAddress NameID format.
In Snowflake: create a SAML2 security integration. This replaces the deprecated SAML_IDENTITY_PROVIDER account parameter. The recommended way to describe the IdP is METADATA_URL. Snowflake then reads the IdP's settings, certificate included, and ALTER SECURITY INTEGRATION ... REFRESH METADATA_URL picks up changes, which simplifies certificate rotation. The issuer URL and the ACS URL have to match the URL you gave the IdP, and the ACS URL ends in /fed/login.
CREATE SECURITY INTEGRATION my_idp
TYPE = saml2
ENABLED = true
METADATA_URL = 'https://integrator-26580.okta.com/app/ex2kbcS30N697/sso/saml/metadata'
SAML2_SNOWFLAKE_ISSUER_URL = 'https://<orgname>-<account_name>.privatelink.snowflakecomputing.com'
SAML2_SNOWFLAKE_ACS_URL = 'https://<orgname>-<account_name>.privatelink.snowflakecomputing.com/fed/login';IdP-initiated SSO works with no further Snowflake configuration. To allow Snowflake-initiated SSO, set SAML2_ENABLE_SP_INITIATED, and set SAML2_SP_INITIATED_LOGIN_PAGE_LABEL to control the button text on the login page. The integration also supports encrypted assertions and signed requests (SAML2_SIGN_REQUEST). Both rely on the certificate in SAML2_SNOWFLAKE_X509_CERT.
Once SSO is running, users can still have Snowflake passwords, but Snowflake recommends keeping passwords only in the IdP. Creating a user without a password, or removing one, turns off Snowflake authentication for that user. Do not use MUST_CHANGE_PASSWORD for federated users. Keep at least one account administrator with a Snowflake password so someone can still sign in if SSO has problems.
Checkpoint 2 of 7· Fill the gap
Which property enables Snowflake-initiated (SP-initiated) SSO on the integration?
ALTER SECURITY INTEGRATION my_idp SET ? = true;SAML2_ENABLE_SP_INITIATED turns on Snowflake-initiated SSO. The login-page label property only sets the text users see.
Source: docs.snowflake.comCheckpoint 3 of 7· Exam question
A company federates all employees through SAML SSO and wants password sign-in blocked for everyone. One break-glass administrator must still be able to sign in with a password if the IdP is down. What is the BEST way to meet both needs?
Correct answer: D — Set an account authentication policy with AUTHENTICATION_METHODS = (SAML), plus a user-level policy allowing PASSWORD on the break-glass user
- A. A password policy governs password rules, not allowed login methods. Expiry forces a reset prompt and does not block password sign-in or grant a break-glass exception.
- B. Network policies filter by client IP and say nothing about the authentication method, so a user on an allowed IP could still sign in with a password.
- C. Unsetting passwords is brittle and per-user, and it leaves the account without an enforced SAML-only rule. New users or later password resets would restore password sign-in.
- D. Account-level policies apply to every user, and a policy set directly on a user takes precedence, so the break-glass user keeps password access while everyone else is limited to SAML.
3.User types: PERSON, NULL and SERVICE
Which authentication methods a user can have depends on its TYPE property. The reason for the split is that people should enroll in MFA, while services and applications should not, because no person is there to provide a second factor. If you don't set TYPE in CREATE USER, it defaults to PERSON.
| TYPE | Represents | Password / SAML SSO sign-in | Other constraints |
|---|---|---|---|
| PERSON | A human user | Allowed | Must enroll in MFA where policy requires it |
| NULL | Functions the same as PERSON | Allowed | Same as PERSON |
| SERVICE | An application with no human interaction | Not allowed | Cannot enroll in MFA; ALTER USER RESET PASSWORD and ALTER USER SET DISABLE_MFA = TRUE cannot be used |
| LEGACY_SERVICE | A non-interactive integration | Allowed | Being deprecated; use SERVICE instead |
SERVICE users also can't have FIRST_NAME, LAST_NAME, PASSWORD, MUST_CHANGE_PASSWORD or MINS_TO_BYPASS_MFA, and authentication-policy MFA enforcement doesn't apply to them. They authenticate with key pairs or tokens, which are covered in the programmatic-authentication lesson.
Checkpoint 4 of 7· Check yourself
An older user object has TYPE = NULL. How does Snowflake treat it?
NULL is not a service type. Snowflake treats it exactly like PERSON.
“Functions the same as PERSON.”Source: docs.snowflake.com
4.Password policies and password resets
A password policy is an object that lives in a schema. Creating one requires CREATE PASSWORD POLICY on the schema, and setting it requires APPLY PASSWORD POLICY on the account or on the user. You can set it on the account with ALTER ACCOUNT or on individual users with ALTER USER. You can't swap one policy for another in place: to change the policy on an account or user, unset the current one first and then set the new one. To make users meet a new policy, set MUST_CHANGE_PASSWORD = TRUE and they will have to change their password at the next login.
| Parameter | Supported range | Default |
|---|---|---|
| PASSWORD_MIN_LENGTH | 8 to 256 | 14 |
| PASSWORD_MAX_AGE_DAYS | 0 to 999 (0 = never needs changing) | 90 |
| PASSWORD_MAX_RETRIES | 1 to 10 | 5 |
| PASSWORD_LOCKOUT_TIME_MINS | 1 to 999 | 15 |
| PASSWORD_HISTORY | Max 24 | 5 |
An administrator can reset a password in two ways. They can set a new one directly with ALTER USER ... SET PASSWORD, or they can generate a single-use reset URL:
ALTER USER janesmith RESET PASSWORD;The URL works once and expires after 12 hours. Generating it does not change anything about the current password. If an ACCOUNTADMIN is locked out, another ACCOUNTADMIN can reset that password. If no other administrator exists, Snowflake Support has to do it.
Checkpoint 5 of 7· Check yourself
An admin runs ALTER USER janesmith RESET PASSWORD. What happens to Jane's existing password?
The reset URL is single-use and expires in 12 hours, but the existing password stays valid until the new one is set.
“does not invalidate the current password”Source: docs.snowflake.com
5.MFA enrollment, recovery and reporting
In accounts created after the 2024_08 bundle, every human user who signs in with a password must enroll in MFA by default. Service users are not included. Authentication policies control MFA. MFA_ENROLLMENT makes enrollment required, MFA_POLICY = (ALLOWED_METHODS = ...) limits which methods users can choose (passkey, TOTP authenticator app, or Duo), and ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION='ALL' requires Snowflake MFA after SSO. Snowflake recommends passkeys.
CREATE AUTHENTICATION POLICY mfa_policy
MFA_ENROLLMENT = REQUIRED
MFA_POLICY = (ALLOWED_METHODS = ('PASSKEY', 'TOTP'));Recovering a locked-out user can go one of two ways. ALTER USER joe ENROLL MFA; emails the user, or returns a URL, so they can register a new method. ALTER USER joe SET MINS_TO_BYPASS_MFA = 30; turns MFA off for that user for 30 minutes, so a single-factor password works during that window. To delete a method that has been lost, look up its name with SHOW MFA METHODS FOR USER joe and then run ALTER USER ... REMOVE MFA METHOD.
Reporting: SHOW USERS returns type and has_mfa columns, and DESC USER shows HAS_MFA. You can filter the SHOW USERS output with the pipe operator (->>) or RESULT_SCAN, for example to list PERSON users where has_mfa is false. Because SHOW output column names are lowercase, refer to them with double-quoted identifiers. Most columns are filtered by privilege. Without OWNERSHIP on the user or MANAGE GRANTS on the account, they come back NULL.
Checkpoint 6 of 7· Check yourself
A PERSON user lost their passkey device and needs to sign in with their password right now, for a short window. Which statement fits?
MINS_TO_BYPASS_MFA disables MFA temporarily, so the user can sign in with a single-factor password for that many minutes.
“help them recover the ability to sign in by temporarily disabling MFA or by helping the user set up a new MFA method”Source: docs.snowflake.com
6.OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity
Snowflake supports the OAuth 2.0 protocol for authentication and authorization, and you configure it with a security integration. There are two flavours. With Snowflake OAuth (TYPE = OAUTH), Snowflake itself is the authorization server: the client sends the user to a Snowflake authorization page, the user signs in and consents to a role, and Snowflake issues an access token and optionally a refresh token. The user can sign in to that authorization page through SSO, so federated authentication and OAuth combine: the IdP authenticates the person, and OAuth authorizes the application. With External OAuth (TYPE = EXTERNAL_OAUTH), your own authorization server (Okta, Microsoft Entra ID, PingFederate or a custom server) issues a JSON Web Token, Snowflake validates it and maps a token claim such as sub to a user attribute such as login_name. Because no browser is needed, External OAuth is the best fit for programmatic clients.
In both cases the client connects with authenticator = oauth and passes the access token in the token parameter. In login history, OAuth logins show FIRST_AUTHENTICATION_FACTOR = OAUTH_ACCESS_TOKEN.
| Category | Snowflake OAuth | External OAuth |
|---|---|---|
| Client application browser access | Required | Not required |
| Programmatic clients | Requires a browser | Best fit |
| Driver property | authenticator = oauth | authenticator = oauth |
| Security integration syntax | create security integration type = oauth ... | create security integration type = external_oauth |
| OAuth flow | OAuth 2.0 code grant flow | Any OAuth flow that the client can initiate with the External OAuth server |
| Secondary roles in session | Not supported (user-created integrations) | Supported |
| Network policy on the integration | NETWORK_POLICY parameter supported | Not supported; use account-level network policies |
Roles. Both flavours block the ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN and SECURITYADMIN roles from OAuth sessions by default. For Snowflake OAuth the account parameter OAUTH_ADD_PRIVILEGED_ROLES_TO_BLOCKED_LIST controls this, and for External OAuth it is EXTERNAL_OAUTH_ADD_PRIVILEGED_ROLES_TO_BLOCKED_LIST. External OAuth carries the role in the token scope, for example session:role:analyst, or session:role-any to use the user's default role. Snowflake OAuth sessions are single-role unless OAUTH_ANY_ROLE_MODE is enabled, and user-created Snowflake OAuth integrations don't support switching to secondary roles in the session. If you need that, use External OAuth.
Custom clients. Snowflake OAuth supports partner applications such as Tableau and Looker (OAUTH_CLIENT = TABLEAU_DESKTOP, LOOKER, and so on) and your own applications with OAUTH_CLIENT = CUSTOM. A custom client must declare OAUTH_CLIENT_TYPE, either 'CONFIDENTIAL' for a client that can keep a secret, such as a server-side service, or 'PUBLIC' for a desktop or app-store client, and must set OAUTH_REDIRECT_URI, which has to use TLS unless you allow otherwise. BLOCKED_ROLES_LIST and ALLOWED_ROLES_LIST bound which roles the user can consent to. The client calls <account_url>/oauth/authorize to get an authorization code and <account_url>/oauth/token-request to exchange it for tokens. Access tokens live 10 minutes by default; refresh-token validity for custom clients is 1 to 90 days. Rotate the client secret with ALTER SECURITY INTEGRATION ... REFRESH OAUTH_CLIENT_SECRET; Snowflake keeps two secrets so rotation is uninterrupted.
CREATE SECURITY INTEGRATION oauth_kp_int
TYPE = OAUTH
ENABLED = TRUE
OAUTH_CLIENT = CUSTOM
OAUTH_CLIENT_TYPE = 'CONFIDENTIAL'
OAUTH_REDIRECT_URI = 'https://localhost.com'
OAUTH_ISSUE_REFRESH_TOKENS = TRUE
OAUTH_REFRESH_TOKEN_VALIDITY = 86400
BLOCKED_ROLES_LIST = ('SYSADMIN')
OAUTH_CLIENT_RSA_PUBLIC_KEY ='
MIIBI
...
';Network policies. A Snowflake OAuth integration can carry its own NETWORK_POLICY. Which policy applies depends on who is talking to Snowflake. When the *user* authenticates in the browser, the network policy attached to the user governs, falling back to the account policy. When the *client* exchanges the authorization code, refreshes a token or queries with the access token, the policy attached to the integration governs, again falling back to the account policy. External OAuth integrations cannot have a network policy at all, so only account-wide policies apply; if you need an integration-specific policy, use Snowflake OAuth.
Private connectivity. External OAuth works with private connectivity. For Snowflake OAuth it depends on the client: Tableau has an embedded OAuth client that can use the private connectivity URL, while Looker with Snowflake OAuth needs the public internet. For a SaaS-hosted client, the browser can reach a PrivateLink URL for the authorization step but the vendor's server cannot, so the token endpoint must be a public Snowflake URL. Set USE_PRIVATELINK_FOR_AUTHORIZATION_ENDPOINT = TRUE on the integration if you want the user's browser redirected to the private authorization endpoint.
Checkpoint 7 of 7· Check yourself
A Snowflake OAuth integration has NETWORK_POLICY = 'allow_private_ip_only'. A user opens the browser authorization page from a coffee-shop IP. Which network policy decides whether that browser step is allowed?
The integration policy only governs the client's token requests and queries. Browser authentication by the user is governed by the user-level policy, falling back to the account policy.
“When the user authenticates by using a browser, the network traffic is restricted by a network policy associated with the user.”Source: docs.snowflake.com
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.With SAML SSO, Snowflake matches the asserted identity against the user's NAME, so the IdP email can be anything.Why is that wrong?
The IdP email address has to match both the Snowflake user's login_name and the SAML NameID. A mismatch means the user cannot sign in.
Covered in Configuring the IdP and the SAML2 security integration
2.Turning on SAML SSO automatically requires Snowflake MFA for SSO users.Why is that wrong?
By default Snowflake trusts the IdP to enforce MFA. Requiring Snowflake MFA after SSO takes an authentication policy with ENFORCE_MFA_ON_EXTERNAL_AUTHENTICATION.
Covered in MFA enrollment, recovery and reporting
3.A user with TYPE = SERVICE can be rescued with ALTER USER RESET PASSWORD.Why is that wrong?
SERVICE users cannot sign in with a password. Both RESET PASSWORD and DISABLE_MFA are blocked for them.
Covered in User types: PERSON, NULL and SERVICE
4.You can restrict an External OAuth integration to specific IPs by setting NETWORK_POLICY on it, just like Snowflake OAuth.Why is that wrong?
External OAuth integrations cannot carry a network policy. Only account-wide policies apply. An integration-specific policy requires Snowflake OAuth.
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Snowflake supports federated authentication through SAML 2.0 and OpenID Connect (OIDC) security integrations.”
↩︎ Federated authentication: SP, IdP, SAML and OIDC“To use an IdP other than Okta or Entra ID, you must define a custom application for Snowflake in the IdP.”
↩︎ Federated authentication: SP, IdP, SAML and OIDC“Global logout is not supported from within Snowflake, regardless of whether the IdP supports it.”
↩︎ Federated authentication: SP, IdP, SAML and OIDC“In a federated environment, user authentication is separated from user access through the use of one or more external entities”
↩︎ Key concept“Not supported (use authenticator=OAUTH_AUTHORIZATION_CODE for driver OIDC SSO)”
↩︎ Checkpoint - 2.
“A SAML2 security integration replaces the deprecated SAML_IDENTITY_PROVIDER account parameter.”
↩︎ Configuring the IdP and the SAML2 security integration“An IdP-initiated SSO does not require configuration in Snowflake.”
↩︎ Configuring the IdP and the SAML2 security integration - 3.
“you must maintain at least one Snowflake account administrator with a Snowflake password.”
↩︎ Configuring the IdP and the SAML2 security integration - 4.
“people need to enroll in multi-factor authentication (MFA), but services and applications should not”
↩︎ User types: PERSON, NULL and SERVICE“They cannot log in using a password. They cannot log in using SAML SSO. They cannot enroll in MFA.”
↩︎ Exam trap 3“Functions the same as PERSON.”
↩︎ Checkpoint - 5.
“Default: PERSON”
↩︎ User types: PERSON, NULL and SERVICE - 6.
“apply the password policy to an account using an ALTER ACCOUNT statement or a user using an ALTER USER statement”
↩︎ Password policies and password resets - 7.
“The generated URL is valid for one use only and expires after 12 hours.”
↩︎ Password policies and password resets“does not invalidate the current password”
↩︎ Checkpoint - 8.
“all human users who authenticate with a password must enroll in MFA by default”
↩︎ MFA enrollment, recovery and reporting“Snowflake relies on the identity provider (IdP) to enforce MFA or some other strong authentication method.”
↩︎ Exam trap 2“Snowflake relies on the identity provider (IdP) to enforce MFA or some other strong authentication method.”
↩︎ Prediction“help them recover the ability to sign in by temporarily disabling MFA or by helping the user set up a new MFA method”
↩︎ Checkpoint - 9.
“If TRUE, the user is enrolled in multi-factor authentication (MFA).”
↩︎ MFA enrollment, recovery and reporting - 10.
“Otherwise, the other columns contain NULL.”
↩︎ MFA enrollment, recovery and reporting - 11.https://docs.snowflake.com/en/user-guide/oauth-introOfficial docs
“Snowflake supports the OAuth 2.0 protocol for authentication and authorization using one of the options below:”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity“the FIRST_AUTHENTICATION_FACTOR column in the output has the value OAUTH_ACCESS_TOKEN.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity - 12.
“Snowflake OAuth does not support in-session role switching to secondary roles.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity“Clients can authenticate to Snowflake without browser access, allowing ease of integration with the External OAuth server.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity - 13.
“By default, Snowflake prevents the ACCOUNTADMIN, ORGADMIN, GLOBALORGADMIN, and SECURITYADMIN roles from authenticating.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity“The token endpoint must therefore be a public Snowflake URL.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity“When the user authenticates by using a browser, the network traffic is restricted by a network policy associated with the user.”
↩︎ Checkpoint - 14.https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-oauth-snowflakeOfficial docs
“Required only when OAUTH_CLIENT = CUSTOM (that is, when creating an integration for a custom client)”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity - 15.https://docs.snowflake.com/en/sql-reference/sql/alter-security-integration-oauth-snowflakeOfficial docs
“Snowflake provides two client secrets (OAUTH_CLIENT_SECRET and OAUTH_CLIENT_SECRET_2) for uninterrupted rotation”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity - 16.
“If your use case requires a network policy that is specific to the OAuth security integration, use Snowflake OAuth.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity“Currently, network policies cannot be added to your External OAuth security integration.”
↩︎ Exam trap 4 - 17.
“User can authorize access with single sign-on (SSO), which allows them to use the secure authentication methods of a third-party IdP.”
↩︎ OAuth 2.0: Snowflake OAuth vs External OAuth, custom clients, network policies and private connectivity
Also cited
“the email address you enter in Okta maps to the login_name value of the user object in Snowflake and the SAML NameID attribute”
↩︎ Exam trap 1