SCIM2ClientUtil - Scoped
-
- UpdatedJan 30, 2025
- 3 minutes to read
- Yokohama
- API reference
The SCIM2ClientUtil API provides utility methods to obtain the unique identifiers of external provider systems and then use that information when calling the SCIM2Client API.
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.
For additional information on SCIM, see System for Cross-domain Identity Management (SCIM).
SCIM2ClientUtil - getProviderIdByFilter(String provider, String resourceName, String filter)
Returns the unique identifier of a specified resource from a specified external provider system for a unique resource ID in a ServiceNow instance using a filter expression to describe the desired resource.
This API is useful when mapping ServiceNow fields to SCIM fields where the resource identifier in the external provider system is needed. Before calling this method, a unique field must be defined for the resource in the system attribute map, located in the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping ] table.
For additional information on provider resource mapping, see Create a SCIM Provider Resource Mapping.
Name | Type | Description |
---|---|---|
provider | String | Name of the configured SCIM service provider. Table: In the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | 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. |
filter | String | Filter expression to apply to the return results. For additional information on the available filter parameters and their associated format, refer to the following section in the Internet Engineering Task Force document: System for Cross-domain Identity Management: Protocol https://datatracker.ietf.org/doc/html/rfc7644#section-3.4.2.2 |
Type | Description |
---|---|
String | Unique resource identifier used by the external service provider. Throws an exception if there is any problem while fetching the information. |
Example
The following example shows how to obtain the resource identifier of the user using the filter 'username eq "abel.tuter"'
.
Output:
Example
The following example shows how to use a script to obtain the resource identifier of the manager using the filter 'userName eq "' + manager + '"'
.
Output:
SCIM2ClientUtil - getProviderIdByResourceId(String provider, String resourceName, String resourceId)
Returns the unique identifier of a specified resource from a specified external provider system for a unique resource ID in a ServiceNow instance.
This API is useful when mapping ServiceNow fields to SCIM fields where the resource identifier in the external provider system is needed. Before calling this method, a unique field must be defined for the resource in the system attribute map, located in the SCIM Provider Resource Mapping [sys_scim_provider_resource_mapping] table.
For additional information on provider resource mapping, see Create a SCIM Provider Resource Mapping.
Name | Type | Description |
---|---|---|
provider | String | Name of the configured SCIM service provider. Table: In the name field of the SCIM Provider [sys_scim_provider] table. |
resourceName | String | 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 | 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 |
---|---|
String | Unique resource identifier used by the external service provider. Throws an exception if there is any problem while fetching the information. |
Example
The following example shows how to obtain the resource identifier of the user with the sys_id f282abf03710200044e0bfc8bcbe5d12.
Output: