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

It's not quite exactly what you did but I'm trying to set the department by name instead of value using SCIM and I wasn't able to find what I'm looking for in the documentation. Do you know if I still need to create a custom field and custom schema? If so how would I map that custom field to a department? Sorry for all the questions, I am pretty new to ServiceNow. Thanks!

cc @Clarkie1 

Hi Ben,

 

Sorry, didn't notice this until now (and I haven't looked at SCIM for months now). Custom schema is a definite, and then you should be able to do a Glide look up under the RTE Entity Operations.

Thank you I am having the same issue, we only get the managers employee id and email so I would need a custom schema to do a gliderecord to get the sysid of the manager(and other reference fields).

Would you mind sharing your custom schema please? And that's great how you them map it in scim-user thank you really helpful.

 

This should be documented more in ServiceNow lol

Hi Pennie,

 

Here is the custom schema you will need to map to a different value than the manager's sys_id:
{
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Schema"
],
"id": "urn:ietf:params:scim:schemas:extension:servicenow:custom:2.0:User",
"name": "CustomUser",
"description": "Custom schema for Users",
"attributes": [
{
"name": "manager",
"type": "string",
"multiValued": false,
"description": "Manager custom ID (e.g. employee ID)",
"required": false,
"caseExact": false,
"mutability": "readWrite",
"returned": "default",
"uniqueness": "none"
}
]

 

And then, in the scim-user ETL Entity mapping, you will need to denote that it should use a custom schema value:

SimonMidtvedt_0-1712818012709.png

 

Finally, you will need to specify that the user ETL Entity mapping should map to the field you like:

SimonMidtvedt_1-1712818120343.png

 

 

Wonderful thankyou, I will have a go!  Really appreciate your help