SCIM user API reference¶
You can use the SCIM user API to access, create, and modify user data.
HTTP headers¶
The Snowflake SCIM API uses bearer tokens for HTTP authentication.
Each HTTP request to the Snowflake SCIM API allows the following HTTP headers:
| Header | Value |
|---|---|
Authorization (Required) | Bearer <access_token>. Snowflake accepts different types of tokens. See Authenticating SCIM API requests. |
Content-Type | application/scim+json |
Accept-Encoding | utf-8 |
Accept-Charset | utf-8 |
Base URL¶
If you are authenticating with External OAuth or programmatic access tokens, specify which SCIM security integration to use by including its UUID in the URL:
To obtain the integration_uuid, run a DESCRIBE SECURITY INTEGRATION command
and copy the value of the SCIM_ENDPOINT_ID property. For example:
If your account has only one enabled SCIM security integration, you can omit the UUID:
If you are authenticating with a SCIM access token, use the shorter base
URL /scim/v2/.
For more information about authentication and base URLs, see Send SCIM requests.
User attributes¶
You can specify user attributes in the body of the API requests as key-value pairs in JSON format. These pairs contain information about the
user, such as the user’s display name or their email address. Identity providers can specify their own key names for each attribute. For
example, identity providers can use the key lastName, instead of familyName, to represent the user’s last name. Snowflake
does not support multi-value user attributes.
Important
In the table below, the attributes userName and loginName both refer to the attribute userName. Snowflake
supports specifying different values for the userName and loginName attributes by setting the
MAP_SCIM_USERNAME_TO_ENTERPRISE_ATTR account parameter to TRUE.
When this parameter is enabled, userName maps to LOGIN_NAME and the snowflakeUserName enterprise extension
attribute maps to NAME.
Snowflake supports the following attributes for user lifecycle management:
| SCIM User Attribute | Snowflake User Attribute | Type | Description |
|---|---|---|---|
id | ID | string | The immutable, unique identifier (GUID) of the user in Snowflake. Snowflake does not return this value in the DESCRIBE USER or SHOW USERS output. For requests on endpoints that require this attribute, such as |
userName | NAME, LOGIN_NAME | string | The identifier used to login into Snowflake. For more information about these attributes, see CREATE USER. |
name.givenName | FIRST_NAME | string | The first name of the user. |
name.familyName | LAST_NAME | string | The last name of the user. |
emails | EMAIL | string | The email address of the user. |
displayName | DISPLAY_NAME | string | The text shown in the user interface when referring to the user. |
externalID | N/A | string | The unique identifier set by the provisioning client (e.g. Azure, Okta). |
password | PASSWORD | string | The password for the user. This value is not returned in the JSON response. If the |
active | DISABLED | boolean | Disables the user when set to false. |
groups | N/A | string | A list of groups to which the user belongs. The group The user’s groups are immutable and their membership must be updated using the SCIM groups API. |
meta.created | CREATED_ON | string | The time the user was added to Snowflake. |
meta.lastModified | UPDATED_ON | string | The time the user was last modified in Snowflake. |
meta.resourceType | N/A | string | The type of resource for the user. You should use user as a value for this attribute. |
schemas | N/A | string | A comma-separated array of strings specifying the namespace URIs. Snowflake supports the following values:
|
Custom attributes¶
You can set custom attributes that are not defined by RFC 7643, such as
defaultRole.
You can use the following namespaces to set custom attributes when making POST, PUT, and PATCH requests:
urn:ietf:params:scim:schemas:extension:enterprise:2.0:UserThis namespace was part of the original SCIM implementation in Snowflake. You can only use this namespace for setting custom attributes in Okta SCIM security integrations.
You cannot use this namespace to set custom attributes in Microsoft Azure SCIM security integrations or custom SCIM integrations.
urn:ietf:params:scim:schemas:extension:2.0:UserYou can use this namespace to set custom attributes for all SCIM integrations. You must use this namespace for setting custom attributes in Microsoft Azure SCIM security integrations or Custom SCIM security integrations.
Snowflake supports the following custom attributes:
| SCIM User Custom Attribute | Snowflake User Attribute | Type | Description |
|---|---|---|---|
allowedInterfaces | ALLOWED_INTERFACES | string | Defines which Snowflake interfaces the user can access. Specified as a comma-delimited list of interfaces. For a list of possible interfaces, see CREATE USER. If a value other than ALL is specified, then users can only access the interface specified and cannot interact with any Snowflake data outside of the interface specified. |
defaultWarehouse | DEFAULT_WAREHOUSE | string | The virtual warehouse that is active by default for the user’s session upon login. |
defaultRole | DEFAULT_ROLE | string | The primary role that is active by default for the user’s session upon login. |
defaultSecondaryRoles | DEFAULT_SECONDARY_ROLES | string | The list of secondary roles that are active for the user’s session upon login. You can set this
attribute to |
type | TYPE | string | The type of user. Default: |
snowflakeTags | SNOWFLAKE_TAGS | string | Assign or update tag values associated with a user. Specify a comma-separated list of tags and tag values that are to be provisioned. These tags must already exist in the account and the integration must be properly provisioned. The format of each entry is as follows:
|
Usage notes for TYPE attribute¶
Note
The LEGACY_SERVICE type is being deprecated. Use the SERVICE type for services and applications. For a timeline of the deprecation of LEGACY_SERVICE, see Planning for the deprecation of single-factor password sign-ins.
This list describes the effects of setting the TYPE attribute in the following SCIM requests:
POSTrequest to create a user, and thetypeattribute is unspecified orNULL, theTYPEproperty is set toPERSON.PATCHrequest with a replace operation that specifies thetypeattribute asNULL,TYPEproperty doesn’t change.PUTrequest with a replace operation, and thetypeattribute is unspecified orNULL, theTYPEproperty is set toPERSON.PATCHrequest with a remove operation that unsets thetypeattribute, theTYPEproperty doesn’t change.
Check if a user exists¶
- Method and endpoint:
GET /scim/v2/Users?filter=userName eq "{{user_name}}"- Description:
Returns details about a user associated with the
userNamequery parameter.If the
MONITOR USERprivilege is granted to the SCIM provisioner, then the SCIM provisioner can see all users in the Snowflake account, instead of only seeing users owned by the SCIM provisioner.For example, to grant the
MONITOR USERprivilege to a SCIM provisioner, you can use the GRANT command:Returns the HTTP response status code
200if the HTTP request successfully completed.
Get details about a user¶
- Method and endpoint:
GET /scim/v2/Users/{{user_id}}- Description:
Returns details about a user associated with the
user_idpath parameter.Returns the HTTP response status code
200if the HTTP request successfully completed.
List users¶
- Method and endpoint:
GET /scim/v2/Users- Description:
Returns a paginated list of users in the account, optionally matching a filter.
If the
MONITOR USERprivilege is granted to the SCIM provisioner, then the SCIM provisioner can see all users in the Snowflake account, instead of only seeing users owned by the SCIM provisioner.For example, to grant the
MONITOR USERprivilege to a SCIM provisioner, you can use the GRANT command:Returns the HTTP response status code
200if the HTTP request successfully completed.Note
This endpoint’s behavior is controlled by the 2026_03 behavior change bundle. For rollout details, see SCIM: List API returns paginated results; unsupported filters rejected (Pending).
- Optional query parameters:
filter=userName { eq | sw } "{name}"- eq:
Searches for a user with a Snowflake
LOGIN_NAMEthat matchesname. The search is case-insensitive.Pagination query parameters, such as
startIndexandcount, are ignored when usingeq.Example: the following request finds a user with
LOGIN_NAMEequal toABC:- sw:
Searches for users with a Snowflake
LOGIN_NAMEthat starts with the value provided forname. The search is case-insensitive.Example: the following request matches users with a
LOGIN_NAMEthat starts withAL, such asALBERTorALICE:
startIndexThe 1-based index of the first result to return. Values less than 1 are treated as 1. Non-numeric values return HTTP
400.Default:
1.Example: the following request returns a list of users, skipping the first user:
countThe maximum number of users returned per page. Negative values are treated as 0 (returns an empty
Resourcesarray). Values above 1000 are treated as 1000. Non-numeric values return HTTP400.Default:
100.Max:
1000.Example: the following request returns a list of users, skipping the first user, with a maximum of 10 users per page:
excludedAttributesExcludes the specified attributes from the response. Only
groupsis supported, which omits the list of roles that each user belongs to. Other values are ignored.Example: the following request returns the first page of users without their groups returned:
Note
For accounts with large numbers of users, specifying
excludedAttributescan significantly reduce response size and latency.- Limitations:
- Only the
userNameattribute is supported for filtering. Filtering on other attributes (for example,externalId) returns an empty result set. - Only the
eqandswoperators are supported. Using an unsupported operator returns HTTP400with SCIM error typeinvalidFilter. - Compound filters using logical operators (
and,or) are not supported and return HTTP400with SCIM error typeinvalidFilter.
- Only the
- Response body objects:
itemsPerPageequals thecountvalue used for the query.totalResultsequalsstartIndex+countwhen more pages are available, or the total number of matching items when no more pages are available.Clients should check that the sum of
startIndexanditemsPerPageis less than or equal tototalCount.Clients should continue making requests until the sum of
startIndexanditemsPerPageis greater thantotalCount.See the following user attributes references:
- Examples:
An example response that returns a paginated list of users, excluding their
groupsattribute from the results:
Create a user¶
- Method and endpoint:
POST /scim/v2/Users- Description:
Creates a user in Snowflake.
Returns the HTTP response status code
201if the HTTP request successfully completed.If the user already exists or the HTTP request failed for a different reason, then Snowflake returns the HTTP response status code
409.- Examples:
Create a user with
userNameandloginNamemapped to the same value:Create a user with
userNameandloginNamemapped to different values:Note
This example requires the MAP_SCIM_USERNAME_TO_ENTERPRISE_ATTR account parameter to be set to
TRUE. Both theuserNameattribute and thesnowflakeUserNameenterprise extension attribute must be specified.If you use Okta as your identity provider, see the Okta procedure for additional IdP configuration steps.
Create a user and assign two tags:
cost_center = financeandtype = PowerUser:
Replace user attributes¶
- Method and endpoint:
PATCH /scim/v2/Users/{{id}}- Description:
Replaces attributes of the user associated with the
idpath parameter.You must set
optoreplaceto perform this HTTP request.activeallows the following values:false: deactivates the user.true: activates the user.
Returns the HTTP response status code
200if the HTTP request was successfully completed.If unsuccessful, returns the HTTP response code
204.- Examples:
Deactivate a user and update their
givenNametodeactivated_user:Update a user with
userNameandloginNamemapped to the same value:Update a user with
userNameandloginNamemapped to different values. This requires the MAP_SCIM_USERNAME_TO_ENTERPRISE_ATTR account parameter to be set toTRUE. If you use Okta as your identity provider, see the Okta procedure for additional IdP configuration steps.Update tag values assigned to a user:
Update a user¶
- Method and endpoint:
PUT /scim/v2/Users/{{id}}- Description:
Updates the attributes of the user associated with the
idpath parameter.If unsuccessful, returns the HTTP response code
400. The HTTP request is unsuccessful if the request tries to change immutable attributes or if the attributes being changed do not exist in Snowflake.- Examples:
Update a user and their
"defaultRole","defaultSecondaryRoles", and"defaultWarehouse"attributes.To specify the
"defaultRole","defaultSecondaryRoles", and"defaultWarehouse"attributes, you must use one of theextensionschemas. ThedefaultSecondaryRolesattribute only accepts"ALL"as a value.Note
The PUT method is more expensive than the PATCH method. Use the PATCH operation instead.
Update a user and their tag values. Omitting a tag value or omitting the tag entirely from the request will remove the tag from the user.
Update a user with
userNameandloginNamemapped to different values. This requires the MAP_SCIM_USERNAME_TO_ENTERPRISE_ATTR account parameter to be set toTRUE. If you use Okta as your identity provider, see the Okta procedure for additional IdP configuration steps.
Delete a user¶
- Method and endpoint:
DELETE /scim/v2/Users/{{id}}- Description:
Deletes the user associated with the
idpath parameter.