What you will be able to do
- Replicate SAML2, OIDC, OAuth and SCIM security integrations in a failover group
- Configure the IdP side so sign-in and provisioning still work after failover
- Confirm a refresh succeeded with refresh history, refresh progress and before-and-after object counts
- Compare replicated users, roles and grants, including future grants, between source and target
1.SAML2 integrations and the connection URL
Replicating a security integration copies its definition, but sign-in only survives failover if the identity provider can also find the new account. Snowflake replicates SAML2 and OIDC (federated SSO), OAuth and SCIM integrations through a failover group. The group lists integrations in OBJECT_TYPES and sets ALLOWED_INTEGRATION_TYPES = security integrations. That copies the integration. The work that remains differs for each integration type.
The fix is to make the connection URL the address that both Snowflake and the IdP use. Before replicating, set SAML2_SNOWFLAKE_ISSUER_URL to the connection URL, such as https://example-global.snowflakecomputing.com, and set SAML2_SNOWFLAKE_ACS_URL to that URL followed by /fed/login. Then configure the IdP application with the same connection URL. How the integration itself is configured is covered in SAML2 SSO and OAuth security integrations. Connections and redirects are covered in Client Redirect and connection objects. Together, these steps let SSO follow Client Redirect to whichever account is primary.
One limitation decides how you design this. A SAML2 integration that uses the connection URL works only on the current primary connection, not on the secondary. After failover the secondary becomes the primary, and SSO works there. If you need SAML SSO into both accounts at the same time, for example to test the standby, create and manage a separate SAML2 integration in each account instead of replicating one.
Checkpoint 1 of 5· Check yourself
Your team replicates a SAML2 integration whose issuer and ACS URLs use the connection URL. Before any outage, the security team wants to sign in to the standby (secondary) account with SAML SSO to test it, while users keep using SSO into the primary. What should you do?
A replicated SAML2 integration that uses the connection URL works only on the current primary connection; the secondary gets SSO only after it is promoted. To have SAML SSO into both accounts at once, you need a separate SAML2 integration in each account.
“If SAML SSO is needed for both primary and secondary connections, then create and manage SAML2 security integrations independently on both Snowflake accounts.”Source: docs.snowflake.com
Sources1
2.OIDC and OAuth integrations after failover
OIDC and OAuth integrations go through the same failover group as SAML2, and their properties replicate with them. That includes OIDC_CLIENT_SECRET, which stays encrypted at rest. For OIDC, the remaining work depends on the provider.
A custom OIDC provider is the harder case. With OIDC_PROVIDER='CUSTOM', the redirect URIs are generated separately for each account and are tied to the account that created the integration. Custom OIDC does not follow Client Redirect. After the integration reaches the target account, run DESC INTEGRATION there, copy its OIDC_REDIRECT_URIS value, and register it with your IdP before you need to fail over. SAML2 has SAML2_SNOWFLAKE_OTHER_ACS_URLS to advertise both ACS URLs; OIDC has no equivalent. With a managed provider (GOOGLE or MICROSOFT), Snowflake manages the client configuration, so there is nothing to register for each account.
| Integration | Extra step for authentication after failover |
|---|---|
| SAML2 | Use the connection URL for SAML2_SNOWFLAKE_ISSUER_URL and SAML2_SNOWFLAKE_ACS_URL, and set the IdP to that URL |
| OIDC, OIDC_PROVIDER='CUSTOM' | Register the target account's OIDC_REDIRECT_URIS (from DESC INTEGRATION) with the IdP |
| OIDC, GOOGLE or MICROSOFT | None: the managed provider does not depend on the account |
| SCIM | Keep the target refreshed; only the primary account receives IdP updates |
Checkpoint 2 of 5· Match them up
After failover, each replicated integration still needs its own follow-up for authentication to keep working. Match each integration to that step.
Tap a term, then the definition that fits it.
Custom OIDC redirect URIs are tied to the account that created the integration and do not follow Client Redirect, so the target account's URI must be registered separately. Managed providers do not depend on the account. SAML2 follows the connection URL. SCIM depends on regular refreshes, because only the primary receives IdP updates.
“you must register the secondary account’s redirect URI with your IdP separately (or use a managed provider, which is account-agnostic)”Source: docs.snowflake.com
Sources1
3.Keeping SCIM provisioning working after failover
SCIM provisioning only ever has one active account. How the IdP pushes users and roles is covered in SCIM provisioning of users and roles from the IdP. After the SCIM integration is replicated, both accounts can receive SCIM updates, but only the primary account actually receives them from the IdP. The target account picks up new users and roles only when it is refreshed from the source.
This makes the replication schedule your provisioning delay for the standby. A user the IdP adds just after one refresh does not exist in the target account until the next refresh. You can also choose to make a different account the primary that receives SCIM updates, which you would do as part of failing over.
Checkpoint 3 of 5· Check yourself
An IdP provisions a new user through SCIM two minutes after the failover group's last scheduled refresh. The group replicates USERS, ROLES and the SCIM security integration on a 10-minute schedule. When does that user exist in the target account?
Only the primary account actually receives SCIM updates from the IdP. The target account gets new users and roles only when it is refreshed from the source, so the replication schedule sets how long the standby lags behind provisioning.
“the target account should include new users that were added to the source account and not previously present in the target account.”Source: docs.snowflake.com
Sources1
4.Validating the refresh: status, users, roles and grants
Start by recording a baseline. Before the first refresh, run SHOW USERS and SHOW INTEGRATIONS in the target account and note the counts. After the refresh, the target should show the new users from the source and one more integration. DESCRIBE INTEGRATION on the SAML2 integration should show the connection URL. If a count is unchanged, the refresh did not deliver what the group was meant to carry.
Next, check the refresh itself. INFORMATION_SCHEMA.REPLICATION_GROUP_REFRESH_HISTORY lists each refresh of a group and its phase, such as COMPLETED or CANCELED. REPLICATION_GROUP_REFRESH_PROGRESS shows the phases of a running refresh with PHASE_NAME, start time and percent progress. In Snowsight, the Replication page shows the latest status and lag for groups where your role has MONITOR, OWNERSHIP or REPLICATE. Refresh operation details are limited to ACCOUNTADMIN and the group owner.
SELECT phase_name, start_time, job_uuid FROM TABLE(INFORMATION_SCHEMA.REPLICATION_GROUP_REFRESH_HISTORY('myfg')) WHERE phase_name <> 'COMPLETED' and phase_name <> 'CANCELED';Grants are where a refresh most often surprises people, because which grants travel depends on the object types in the group. Replicating ROLES brings the grants for the object types in the group. If ROLES is the only type, you get only the role hierarchy. Role grants to users arrive only when USERS is also included. Future grants at the database or schema level replicate with roles, even for object types that cannot be replicated themselves. How grants work is covered in Privilege grants and future grants. To verify them, run SHOW GRANTS TO ROLE for the same role in both accounts and compare the results.
The refresh runs as the departed engineer's user. A refresh fails when the user who calls it in the target account has been dropped in the source. Run refreshes as a service user and a dedicated role that holds REPLICATE in both accounts.
Checkpoint 4 of 5· Fill the gap
Before you promote a secondary failover group, you need to find any refreshes of myfg that have not reached a final state. Which table function completes this query?
SELECT phase_name, start_time, job_uuid FROM TABLE(INFORMATION_SCHEMA. ? ('myfg')) WHERE phase_name <> 'COMPLETED' and phase_name <> 'CANCELED';REPLICATION_GROUP_REFRESH_HISTORY lists every refresh of a group with its phase. Filtering out COMPLETED and CANCELED leaves only refreshes that have not finished. REPLICATION_GROUP_REFRESH_PROGRESS shows the phases of a single running refresh, and GRANTS_TO_ROLES is an Account Usage view for auditing privileges.
Source: docs.snowflake.comCheckpoint 5 of 5· Check yourself
A failover group's OBJECT_TYPES lists ROLES and DATABASES but not USERS. The refresh succeeds. An auditor then runs SHOW GRANTS in both accounts and compares the results. Which grants are missing from the target account?
Replicating ROLES brings the role hierarchy plus grants on the object types in the group, so grants on the replicated databases and their future grants arrive. Role grants to users are replicated only when USERS is also in OBJECT_TYPES.
“If the USERS object type is also included, then role grants to users are also replicated.”Source: docs.snowflake.com
Practise it for real
Replicate a SAML2 security integration and users to a target account, then prove the refresh delivered them
1.In the target account, run SHOW USERS and SHOW INTEGRATIONS and record the counts.
Why: You need a baseline to show the refresh changed anything.
You should see: Two counts, with no SAML2 integration that uses the connection URL yet.
2.In the source account, create the failover group with OBJECT_TYPES including users, roles and integrations, ALLOWED_INTEGRATION_TYPES = security integrations, and ALLOWED_ACCOUNTS set to the target.
Why: Security integrations replicate only when both the object type and the integration type are allowed, and only to the accounts listed.
You should see: The group appears in SHOW FAILOVER GROUPS in the source account.
3.In the target account, run CREATE FAILOVER GROUP fg AS REPLICA OF example.northamericawest.fg;
Why: Creating the secondary group starts the first refresh automatically.
You should see: A secondary group, with a refresh running or finished.
4.Run the REPLICATION_GROUP_REFRESH_HISTORY query for the group in the target account.
Why: Confirms the refresh reached a final phase rather than stalling or being canceled.
You should see: No rows other than COMPLETED or CANCELED once the refresh finishes.
5.Rerun SHOW USERS and SHOW INTEGRATIONS, then DESCRIBE INTEGRATION my_idp.
Why: Checks that the users and the connection-URL SAML2 integration arrived.
You should see: New users, one more integration, and issuer and ACS URLs that point at the connection URL.
Stuck? Get a nudge
If the refresh fails, check that the user running it still exists in the source account and that its role holds REPLICATE in the target account.
Sources
(6)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Snowflake supports replicating network policies and security integrations for federated SSO (that is, SAML2 and OIDC), OAuth, and SCIM”
↩︎ SAML2 integrations and the connection URL“update the SAML2 security integration to specify the connection URL for the saml2_snowflake_issuer_url and saml2_snowflake_acs_url security integration properties”
↩︎ SAML2 integrations and the connection URL“create and manage SAML2 security integrations independently on both Snowflake accounts.”
↩︎ SAML2 integrations and the connection URL“including OIDC_CLIENT_SECRET (encrypted at rest).”
↩︎ OIDC and OAuth integrations after failover“For custom providers (OIDC_PROVIDER='CUSTOM'), OIDC_REDIRECT_URIS is generated per account.”
↩︎ OIDC and OAuth integrations after failover“the same approach as for SAML2 and OAuth security integrations”
↩︎ OIDC and OAuth integrations after failover“it is the primary account that receives SCIM updates from the identity provider.”
↩︎ Keeping SCIM provisioning working after failover“the target account can receive SCIM updates from the source account only after refreshing the target account.”
↩︎ Keeping SCIM provisioning working after failover“SHOW INTEGRATIONS (should include 1 new integration) SHOW USERS (should include the number of new users added)”
↩︎ Validating the refresh: status, users, roles and grants“replicating a SAML2 security integration that specifies the connection URL is only supported on the current primary connection”
↩︎ Exam trap 1“OIDC integrations using OIDC_PROVIDER='CUSTOM' are not Client Redirect-aware.”
↩︎ Exam trap 2“It is important to update the identity provider to specify the connection URL and that users exist in the source account.”
↩︎ Prediction“If SAML SSO is needed for both primary and secondary connections, then create and manage SAML2 security integrations independently on both Snowflake accounts.”
↩︎ Checkpoint“you must register the secondary account’s redirect URI with your IdP separately (or use a managed provider, which is account-agnostic)”
↩︎ Checkpoint“the target account should include new users that were added to the source account and not previously present in the target account.”
↩︎ Checkpoint - 2.https://docs.snowflake.com/en/sql-reference/functions/replication_group_refresh_progressOfficial docs
“Name of the replication phases completed (or in progress) so far.”
↩︎ Validating the refresh: status, users, roles and grants - 3.
“Refresh operation details are only available to users with the ACCOUNTADMIN role or the OWNERSHIP privilege on the group.”
↩︎ Validating the refresh: status, users, roles and grants - 4.
“If the USERS object type is also included, then role grants to users are also replicated.”
↩︎ Validating the refresh: status, users, roles and grants - 5.
“future grants that are granted at the database or schema level are replicated to the target account”
↩︎ Validating the refresh: status, users, roles and grants - 6.
“If the user who calls the function in the target account was dropped in the source account, the refresh operation fails.”
↩︎ Validating the refresh: status, users, roles and grants