Mapping custom field with SCIM API

Alex Ng
Tera Contributor

Hi Community,

 

I am trying to consume SCIM API that comes from "SCIM v2 - ServiceNow Cross-domain Identity Management" plugin. Referring to documentation on "https://docs.servicenow.com/bundle/tokyo-application-development/page/integrate/inbound-rest/concept...", I can basically do a POST command to create records in User [sys_user] table.

In SCIM schema, it supports "userType" attribute. May I know how do I map this attribute back to a custom field in ServiceNow? I realize I can create record successfully with a code of 201 using the REST API but I cannot seems to find a menu path or configuration to map this attribute back to ServiceNow User [sys_user] table.

Can you please advice if anyone has done this before and what do I require to map a custom field in ServiceNow with a field from the SCIM schema?

Thank you!

1 ACCEPTED SOLUTION

Clarkie1
Giga Expert

Hey Alex,

The only way to do this is on Tokyo version (or higher) as it supports SCIM customisation. Once upgraded, you can look at the SCIM ETL definitions and tweak as required.

 

View solution in original post

12 REPLIES 12

Clarkie1
Giga Expert

Hey Alex,

The only way to do this is on Tokyo version (or higher) as it supports SCIM customisation. Once upgraded, you can look at the SCIM ETL definitions and tweak as required.

 

Alex Ng
Tera Contributor

Found it once I upgraded to Tokyo version. Thanks Clarkie!

Simon Midtvedt
Tera Guru

If anyone is looking to map to a custom field inside a reference field, I figured out a solution (note: Tokyo release is still required):

In my case, I wanted to map to a custom ID field on the location record (location is a reference field on the user record). We have created a field called "u_id" that stores a custom ID value that the Identity Manager (IDM) wanted to map to, i.e. they wanted to set location "xyz" on the user record, which was not a sys_id but a custom ID ("u_id").

According to the documentation on ETL Definition, one would think that all you had to do was change the Field/Path value for Location from "location.sys_id" to "location.u_id" on the user ETL Entity ("target" entity).

SimonMidtvedt_0-1673623500019.png

 

However, that was not enough..

 

In addition, we needed to add a custom extension schema, documented here, and the Location Field/Path value on the scim-user ("staging" entity) neded to be set to "custom.location" instead of "servicenow.location.value". The IDM then needed to send their PATCH request to this custom schema instead. 

 

All in all, I am not entirely sure why this worked (or didn't work without the custom extension schema), but hopefully this can be of help to someone.

The joys of SCIM. There are numerous "reference" field objects in the SCIM schema and each one has a $ref, id and value. These need to align with the system "id" (sys_id in ServiceNow) for it to work unfortunately, so as you said a custom field is required for that.