SCIM attribute mappings
The default SCIM attribute mappings for users and groups, the Entra ID mapping changes, custom mapping scripts and tenant URLs.
This page lists how SCIM attributes from Microsoft Entra ID reach Servicely user and group fields, and how to add your own mappings. Use it while you set up or extend SCIM provisioning from Entra ID.
How to read these tables
Two sets of mappings apply. Entra ID maps its own attributes to SCIM attributes, in the enterprise application’s provisioning settings. Servicely then maps SCIM attributes to its own fields. Servicely ships a fixed set of default mappings, and a custom mapping on a SCIM configuration overrides a default or adds one.
Entra ID user mapping changes
Change the Entra user mapping as follows. It matches users by userName.
| Name | Value | Notes |
|---|---|---|
externalId |
Change the source from mailNickname to objectId |
Servicely stores it as the user’s External key. |
displayName |
Delete the mapping | Servicely builds the display name from the first and last names. |
name.formatted |
Delete the mapping | Same reason as displayName. |
addresses[type eq "work"] attributes |
Delete if you do not map them | The User table has no address fields. Location is a single reference field. Map them with a custom mapping if you need them. |
phoneNumbers[type eq "fax"].value |
Delete if you do not map it | The User table has no fax field. |
Default mappings
Users
| Name | Value | Notes |
|---|---|---|
id |
External key | |
externalId |
External key | |
name.givenName |
First name | |
name.familyName |
Last name | |
userName |
User name | Used to match users. |
title |
Title | |
preferredLanguage |
Preferred language | |
timezone |
Time zone | |
emails[type eq "work"] |
||
phoneNumbers[type eq "work"] |
Desk phone | |
phoneNumbers[type eq "mobile"] |
Mobile | |
enterpriseUser.employeeNumber |
Employee number | |
enterpriseUser.manager |
Manager |
Groups
| Name | Value | Notes |
|---|---|---|
id |
External key | |
externalId |
External key | Entra already maps it to objectId. |
displayName |
Name | Used to match groups. |
Custom mapping fields
Add a custom mapping from the Attribute mappings related list of a SCIM configuration, with New. Only active mappings apply.
| Name | Value | Notes |
|---|---|---|
| Name | Text | What the mapping does. |
| Active | Yes or No | Only active mappings run. |
| Schema | User or Group | The record type the mapping applies to. |
| Attribute | A top-level SCIM attribute | For example userName, emails, addresses or the enterprise user extension. A complex attribute such as emails is handled in one mapping. |
| Inbound script | Script | Maps the SCIM data in attributeData to fields on current when Entra ID pushes a change. |
| Outbound script | Script | Builds the SCIM value from current and sets answer when Entra ID reads the record. |
| Description | Text | Notes for other administrators. |
The two scripts must be inverses. Entra ID compares what the outbound script returns with its own value to decide whether to send an update.
Example mappings
The example SCIM configuration for Entra ID ships two inactive example mappings: one for Country and one for Department and Company.
Country
This mapping takes the country part of the SCIM work address and sets a country field on the user. Its outbound script returns a work address that holds only the country.

Department and company
This mapping uses two fields of the enterprise user extension to set the user’s Department and Company. It creates a department or company that does not exist yet.

Inbound script:
// attributeData holds the enterprise extension, for example
// { "employeeNumber": "5554433", "organization": "Foo", "department": "Bar" }
if (attributeData) {
let departmentName = attributeData.department;
let companyName = attributeData.organization;
if (departmentName) {
let department = Table("Department", EQUAL("Name", departmentName));
if (!department) {
department = Table("Department").newRecord().Name(departmentName).create();
}
current.Department(department.ID());
}
if (companyName) {
let company = Table("Company", EQUAL("Name", companyName));
if (!company) {
company = Table("Company").newRecord().Name(companyName).create();
}
current.Company(company.ID());
}
}
Outbound script:
let departmentName = null;
let companyName = null;
let department = current.Department();
if (department) {
departmentName = department.Name();
}
let company = current.Company();
if (company) {
companyName = company.Name();
}
if (departmentName || companyName) {
attributeData = attributeData || {};
if (departmentName) {
attributeData.department = departmentName;
}
if (companyName) {
attributeData.organization = companyName;
}
}
answer = attributeData;
Group email
Groups have no email field by default. This example maps the Entra group’s mail attribute to a custom field you create on Group, here C_Email. It uses one of the custom app attributes Entra allows, extensionAttribute1 on the Servicely group extension.
In Entra ID, on the group mapping screen, select Show advanced options, then Edit attribute list for customappsso.

Add the attribute urn:ietf:params:scim:schemas:extension:Servicely:2.0:Group:extensionAttribute1 and save.

Back on the group mapping screen, edit the new mapping and set Source attribute to mail.

The group mappings then include the new attribute.

In Servicely, add a mapping to the active SCIM configuration with Name “Group email mapping”, Active Yes, Schema Group and Attribute urn:ietf:params:scim:schemas:extension:Servicely:2.0:Group.

Inbound script:
if (attributeData?.extensionAttribute1) {
current.C_Email(attributeData.extensionAttribute1);
}
Outbound script:
let email = current.C_Email();
if (email) {
attributeData = attributeData || {};
attributeData.extensionAttribute1 = email;
}
answer = attributeData;
Tenant URLs
To provision from several Entra tenants, create one SCIM configuration per tenant and give each a Key. Each key gives the configuration its own URL. Each configuration needs its own attribute mappings.
| Name | Value | Notes |
|---|---|---|
| Tenant URL without a key | https://<instance-name>.servicely.ai/scim/v2 |
Uses the active configuration with no key. |
| Tenant URL with a key | https://<instance-name>.servicely.ai/scim/<key>/v2 |
Uses the active configuration with that key. For example .../scim/secondarySCIMProvider/v2. |
| Default | Yes or No | Decides which configuration applies when more than one active configuration matches the URL. With only one match, it has no effect. |
