I Tried Setting Up SAML SSO and SCIM Provisioning for Snowflake with Microsoft Entra ID

I Tried Setting Up SAML SSO and SCIM Provisioning for Snowflake with Microsoft Entra ID

I implemented SAML 2.0 SSO and SCIM user provisioning in Snowflake with Microsoft Entra ID. This post walks through the actual steps, from setup using the metadata URL to automatic user creation via SCIM.
2026.11.23

This page has been translated by machine translation. View original

Introduction

This article covers my experience trying federated SSO with SAML 2.0 and user provisioning with SCIM in Snowflake, using Microsoft Entra ID.

Overview of SAML SSO and SCIM

The SAML2 security integration and SCIM in Snowflake are described in the following documents.

https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-security-integration

https://docs.snowflake.com/en/user-guide/scim-azure

https://community.snowflake.com/s/article/entra-id-sso-to-snowflake-public-and-private-link

https://learn.microsoft.com/ja-jp/entra/identity/saas-apps/snowflake-tutorial

The role of each feature is as follows.

Feature Role
SAML SSO User authentication. Links the person who signed in with Entra ID to a Snowflake user and signs them in
SCIM Creating and updating users. Automatically creates Entra ID users and groups as Snowflake users and roles

Using SCIM together lets you automate everything up to user creation.

SAML Metadata URL

When creating a SAML2.0 security integration, the previous method was to paste the IdP's signing certificate as a string, but with the February 2026 update, you can now specify the IdP's metadata URL (METADATA_URL).

https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-security-integration#create-a-saml2-security-integration

When you specify a metadata URL, Snowflake dynamically retrieves the IdP's configuration, including the certificate. You do not need to paste the certificate manually, and even when the certificate is rotated on the IdP side, you can synchronize the new certificate information with ALTER SECURITY INTEGRATION ... REFRESH METADATA_URL.

In this article, I will try this method as well. Note that METADATA_URL is supported only for Okta and Microsoft Entra ID.

https://docs.snowflake.com/en/sql-reference/sql/create-security-integration-saml2

Differences from OIDC

The following article tries the same Entra ID with OIDC federated authentication (managed provider).

https://dev.classmethod.jp/articles/snowflake-oidc-federated-auth-preview/

The official Snowflake documentation summarizes a comparison between OIDC and SAML 2.0.

https://docs.snowflake.com/en/user-guide/admin-security-fed-auth-overview#oidc-vs-saml-comparison

The main differences are as follows.

Item OIDC SAML 2.0
Credentials Client ID and Client Secret X.509 certificate
Managed providers Google, Microsoft None
SSO in the browser (Snowsight) Supported Supported
SSO for drivers (authenticator=externalbrowser) Not supported (use OAUTH_AUTHORIZATION_CODE) Supported
User mapping Maps an ID token claim to LOGIN_NAME or EMAIL_ADDRESS (for managed Microsoft, fixed to email→EMAIL_ADDRESS) Maps NameID to LOGIN_NAME (the NameID in Entra ID is the UPN by default)
Email verification A verified email is required when mapping by EMAIL_ADDRESS Not required

From the driver's perspective, OIDC cannot use externalbrowser and connects via Snowflake OAuth (authenticator=OAUTH_AUTHORIZATION_CODE).
SAML, on the other hand, can connect with externalbrowser using only the SAML2 integration.

For Snowflake OAuth, please refer to the following.

https://dev.classmethod.jp/articles/snowflake-oauth-local-applications-snowflakecli-try/

Prerequisites

Verification Environment

I used the following environment.

  • Snowflake: Trial account (AWS Tokyo region)
  • Microsoft Entra ID
    • A verification tenant prepared with a Microsoft 365 Business Standard trial
    • Worked as Global Administrator
  • Snowflake CLI: 3.34.0

Entra ID Side: Adding an Enterprise Application

In the Entra admin center, open "New application" from "Entra ID > Enterprise apps" and add "Snowflake for Microsoft Entra ID".

Give it any name you like and select "Create".

From the overview of the added app, select "Set up single sign-on".

In the method selection, choose "SAML".

On the next screen, set up single sign-on with SAML. First, edit the "Basic SAML Configuration".

Set the identifier, reply URL, and so on as follows, according to the target Snowflake account information.

Item Value
Identifier(Entity ID) https://<organization_name>-<account_name>.snowflakecomputing.com
Reply URL(ACS) https://<organization_name>-<account_name>.snowflakecomputing.com/fed/login
Sign-on URL https://<organization_name>-<account_name>.snowflakecomputing.com
Logout URL https://<organization_name>-<account_name>.snowflakecomputing.com/fed/logout

The Identifier and Reply URL set here must be exactly the same strings as SAML2_SNOWFLAKE_ISSUER_URL and SAML2_SNOWFLAKE_ACS_URL, which will be specified on the Snowflake side later.

For the second item, "Attributes & Claims", I left it at the defaults. The unique user identifier (NameID) is user.userprincipalname (UPN).

Claim Value
Unique user identifier (NameID) user.userprincipalname
emailaddress user.mail
name user.userprincipalname
givenname user.givenname
surname user.surname

Next, make a note of the "App Federation Metadata URL" displayed in the "SAML Certificates" section.

Snowflake Side: Creating the Security Integration

Using ACCOUNTADMIN, create a SAML2 security integration by specifying the metadata URL.
Just by specifying the metadata URL, the Issuer, SSO URL, and signing certificate are retrieved.

USE ROLE ACCOUNTADMIN;

CREATE OR REPLACE SECURITY INTEGRATION entra_saml
  TYPE = SAML2
  ENABLED = TRUE
  METADATA_URL = '<アプリのフェデレーション メタデータ URL>'
  SAML2_SP_INITIATED_LOGIN_PAGE_LABEL = 'Entra ID SSO'
  SAML2_ENABLE_SP_INITIATED = TRUE
  SAML2_SNOWFLAKE_ISSUER_URL = 'https://<organization_name>-<account_name>.snowflakecomputing.com'
  SAML2_SNOWFLAKE_ACS_URL = 'https://<organization_name>-<account_name>.snowflakecomputing.com/fed/login';

Creating a User and Assigning to the App

In Snowflake, the NameID is matched against the user's LOGIN_NAME. Since the NameID is the UPN, set the Snowflake user's LOGIN_NAME to the Entra ID user's UPN.

USE ROLE USERADMIN;

CREATE USER IF NOT EXISTS saml_entra_user
  TYPE = PERSON
  LOGIN_NAME = '<Entra ID のユーザー名(UPN)>'
  EMAIL = '<Entra ID のメールアドレス>'
  DEFAULT_ROLE = PUBLIC;

The user name (NAME) is not used for matching, so any name will do.

Next, assign the users who will sign in under "Users and groups" of the Entra ID app.

Trying to Sign In with SAML

Signing In from Snowsight

After the setup, when you open the Snowflake login screen, a "Log In With Entra ID SSO" button is displayed.

After signing in with Entra ID, I was able to sign in to Snowsight as the target user.

The login history can be confirmed as FIRST_AUTHENTICATION_FACTOR = 'SAML2_ASSERTION'.

SELECT event_timestamp, user_name, client_ip, reported_client_type,
       first_authentication_factor, is_success, error_code, error_message
FROM TABLE(SNOWFLAKE.INFORMATION_SCHEMA.LOGIN_HISTORY_BY_USER(USER_NAME => 'SAML_ENTRA_USER'))
ORDER BY event_timestamp DESC;
+-------------------------------+-----------------+---------------+----------------------+-----------------------------+------------+------------+---------------+                                                                                                                                          
| EVENT_TIMESTAMP               | USER_NAME       | CLIENT_IP     | REPORTED_CLIENT_TYPE | FIRST_AUTHENTICATION_FACTOR | IS_SUCCESS | ERROR_CODE | ERROR_MESSAGE |                                                                                                                                          
|-------------------------------+-----------------+---------------+----------------------+-----------------------------+------------+------------+---------------|
| 2026-11-22 17:38:16.986 -0800 | SAML_ENTRA_USER | xx.xx.xx.xx   | SNOWFLAKE_UI         | SAML2_ASSERTION             | YES        |       NULL | NULL          |
+-------------------------------+-----------------+---------------+----------------------+-----------------------------+------------+------------+---------------+

Signing In from Snowflake CLI

With SAML, you can also use SSO from the Snowflake CLI with authenticator=externalbrowser.
When executed, the browser opened, and after signing in with Entra ID, the query results were returned.

snow connection add --connection-name saml_test --account <organization_name>-<account_name> --user "<LOGIN_NAME>" --authenticator externalbrowser --no-interactive
+-----------------------------------------------------------+
| CURRENT_USER()  | CURRENT_ROLE() | CURRENT_ACCOUNT_NAME() |
|-----------------+----------------+------------------------|
| SAML_ENTRA_USER | PUBLIC         | <account_name>         |
+-----------------------------------------------------------+

Provisioning Users with SCIM

Next, I will configure SCIM and try automatically creating Entra ID users in Snowflake.

Snowflake Side Preparation

Create a SCIM role and a SCIM security integration, and generate the access token to be set in Entra ID.

USE ROLE ACCOUNTADMIN;

CREATE ROLE IF NOT EXISTS aad_provisioner;
GRANT CREATE USER ON ACCOUNT TO ROLE aad_provisioner;
GRANT CREATE ROLE ON ACCOUNT TO ROLE aad_provisioner;
GRANT ROLE aad_provisioner TO ROLE ACCOUNTADMIN;

CREATE OR REPLACE SECURITY INTEGRATION aad_provisioning
  TYPE = SCIM
  SCIM_CLIENT = 'azure'
  RUN_AS_ROLE = 'AAD_PROVISIONER';

SELECT SYSTEM$GENERATE_SCIM_ACCESS_TOKEN('AAD_PROVISIONING');

Note that the access token is valid for 6 months. If you do not reissue it with SYSTEM$GENERATE_SCIM_ACCESS_TOKEN and replace the token in Entra ID before it expires, provisioning will stop.

https://docs.snowflake.com/ja/user-guide/scim-azure#snowflake-configuration

Entra ID Side Configuration

In the app's "Provisioning", select "Connect your application".

In the provisioning configuration, specify the following and create it.

Item Value
Tenant URL https://<organization_name>-<account_name>.snowflakecomputing.com/scim/v2
Secret Token The access token generated with the SQL above

Creating and Assigning Users

To verify SCIM's behavior, I created a new test user in Entra ID. I also set the user's "Email" under "Contact information" (the mail attribute).

Because users to be synchronized also need to be assigned to the app, assign the user under the app's "Users and groups".

After assignment, running "Provision on demand" here synchronized the user.

Here is the synchronization completed:

Note that Entra ID's automatic provisioning by default synchronizes assigned users on a 40-minute cycle.

Checking on the Snowflake Side

You can check the user that was created on the Snowflake side.

DESC USER "<UPN を大文字にした名前>";

The attributes of the created user were as follows.

Item Value
NAME UPN (uppercase)
LOGIN_NAME UPN (uppercase)
DISPLAY_NAME Display name in Entra ID
EMAIL Value of the mail attribute in Entra ID
Owner (owner) The SCIM role
Password None
DEFAULT_ROLE None

The UPN is set in both NAME and LOGIN_NAME. Because it matches the SAML NameID (UPN), users created via SCIM can be used for SAML SSO as is.

The history of SCIM requests can also be checked with REST_EVENT_HISTORY.

SELECT event_timestamp, endpoint, method, status, error_code, details
FROM TABLE(snowflake.information_schema.REST_EVENT_HISTORY('scim'))
ORDER BY event_timestamp DESC
LIMIT 20;

DEFAULT_ROLE was not set for the user created via SCIM. With SCIM, in addition to the standard attributes, you can set properties using custom attributes such as defaultRole.
For details, please refer to the following.

https://docs.snowflake.com/en/user-guide/scim-user-api-reference

Conclusion

I tried integrating Snowflake's SAML SSO with Microsoft Entra ID using the metadata URL method, and the flow of automatically creating users with SCIM.
I hope this is helpful to someone.


Snowflakeの導入支援はクラスメソッドに!

クラスメソッドでは Snowflake の導入を支援しております。
製品の詳細や支援の内容についてお気軽にお問い合わせください。

Snowflakeの詳細を見る

Share this article