SCIM2Client - Scoped
-
- UpdatedJan 30, 2025
- 7 minutes to read
- Yokohama
- API reference
The SCIM2Client API provides methods that call the System for Cross-domain Identity Management (SCIM) Provider (server role) to create, update, or delete data in a service provider (SP).
SCIM is a REST and JSON-based protocol that defines a client and server role. A client is usually an identity provider (IDP), such Okta, that contains a robust directory of user identities. An SP is typically a SaaS application, such as Box or Slack, that needs a subset of information from those identities. When changes to identities are made in the IDP, including create, update, and delete, they are automatically synchronized to the SP according to the SCIM protocol.
The following image illustrates typical API call flows for manipulating service provider data.
This API runs in the sn_auth
namespace and requires the SCIM v2 - ServiceNow
Cross-domain Identity Management Client (com.snc.integration.scim2.client) plugin to be
installed to access the API.
You can locate the results of each SCIM method call in the SCIM Client Logs [sys_scim_client_logs] table.
For additional information on SCIM, see System for Cross-domain Identity Management (SCIM).
SCIM2Client - executeDelete (String provider, String resourceName, String providerResourceId)
Deletes a specified resource from an external service provider system.
Name | Type | Description |
---|---|---|
provider | String | Required. Name of the configured SCIM service provider. The service provider name is defined in the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | Required. Name of the resource type, such as User or Group. Table: In the resource_name field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
providerResourceId | String | Required. Unique identifier of the associated resource on the external service provider system. |
Type | Description |
---|---|
message | If the status is SUCCESS, the endpoint returns the response
body as defined by the REST SCIM API. Data type: String |
status | Status of the request. Possible values:
Data type: String |
Example
The following example shows how to delete a user resource in the SNOW Provider system.
Output:
SCIM2Client - executeGet (String provider, String resourceName, String queryParams)
Returns all resources from a specified external provider system that match the passed criteria.
This information is used to call the corresponding SCIM service provider API.
Name | Type | Description |
---|---|---|
provider | String | Required. Name of the configured SCIM service provider. The service provider name is defined in the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | Required. Name of the resource type, such as User or Group. Table: In the resource_name field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
queryParams | String | Required. SCIM compliant query parameters passed to the external SCIM service
provider endpoint. For additional information on the available query parameters and
their associated format, refer to the following sections in the Internet Engineering
Task Force document: System for Cross-domain Identity Management: Protocol |
Type | Description |
---|---|
message | If the status is SUCCESS, the endpoint returns the response
body as defined by the REST SCIM API. Data type: String |
status | Status of the request. Possible values:
Data type: String |
Example
The following example shows how to retrieve all of the available users from the snow test service provider whose work email contains lucius.bagnoli.
Response:
SCIM2Client - executeGetById (String provider, String resourceName, String providerResourceId, Map<String, String> queryParams)
Returns a resource from the external provider system with the specified unique resource ID.
This information is used to call the corresponding SCIM service provider API.
Name | Type | Description |
---|---|---|
provider | String | Required. Name of the configured SCIM service provider. The service provider name is defined in the name field of the SCIM Provider [sys_scim_provider] table. |
providerResourceId | String | Required. Unique identifier of the associated resource on the external service provider system. |
queryParams | String | Required. SCIM compliant query parameters passed to the external SCIM service
provider endpoint. For additional information on the available query parameters and
their associated format, refer to the following sections in the Internet Engineering
Task Force document: System for Cross-domain Identity Management: Protocol |
Type | Description |
---|---|
message | If the status is SUCCESS, the endpoint returns the response
body as defined by the REST SCIM API. Data type: String |
status | Status of the request. Possible values:
Data type: String |
Example
This example shows how to obtain the specified resource from the external provider system "snow test".
Output:
SCIM2Client - provision (String provider, String resourceName, String resourceId)
Creates or updates a resource in an external service provider system for a specified sys_id.
For example, if you create or update a user in a ServiceNow instance, you can use this method to create or update the same resource on an external service provider system. Only those fields which are mapped in the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping ] table can be created or updated in the corresponding resource.
For additional information on provider resource mapping, see Create a SCIM Provider Resource Mapping.
Name | Type | Description |
---|---|---|
provider | String | Required. Name of the configured SCIM service provider. The service provider name is defined in the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | Required. Name of the resource type, such as User or Group. Table: In the resource_name field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
resourceId | String | Required. Sys_id of the resource saved in the ServiceNow instance (the client). Table: In the primary_table field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
Type | Description |
---|---|
message | If the status is SUCCESS, the endpoint returns the response
body as defined by the REST SCIM API. Data type: String |
status | Status of the request. Possible values:
Data type: String |
Example
The following example shows how to provision a user on the Snow Provider.
Output:
SCIM2Client - provisionNew (String provider, String resourceName, String resourceId)
Creates a new resource in an external service provider system for a specified sys_id.
For example, if you create a new user in a ServiceNow instance, you can use this method to create the same resource on an external service provider system. Only those fields which are mapped in the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table can be created in the corresponding external service provider system. If the resource is already present in the external service provider system, an error response is returned.
For additional information on provider resource mapping, see Create a SCIM Provider Resource Mapping.
Name | Type | Description |
---|---|---|
provider | String | Required. Name of the configured SCIM service provider. The service provider name is defined in the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | Required. Name of the resource type, such as User or Group. Table: In the resource_name field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
resourceId | String | Required. Sys_id of the resource saved in the ServiceNow instance (the client). Table: In the primary_table field of the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table. |
Type | Description |
---|---|
message | If the status is SUCCESS, the endpoint returns the response
body as defined by the REST SCIM API. Data type: String |
status | Status of the request. Possible values:
Data type: String |
Example
The following example shows how to create a new user in the external service provider SNOW Provider.
Output:
On this page
- SCIM2Client - executeDelete (String provider, String resourceName, String
providerResourceId)
- SCIM2Client - executeGet (String provider, String resourceName, String queryParams)
- SCIM2Client - executeGetById (String provider, String resourceName, String
providerResourceId,
Map<String,
String> queryParams)
- SCIM2Client - provision (String provider, String resourceName, String resourceId)
- SCIM2Client - provisionNew (String provider, String resourceName, String
resourceId)