SCIM attribute mappings
The default mappings from SCIM attributes to user and group fields, and the fields and script variables of a custom attribute mapping.
This page lists how the SCIM attributes that Microsoft Entra ID sends reach Servicely user and group fields, and what a custom mapping holds. Look it up while you follow Set up SCIM provisioning from Entra ID or add an attribute of your own. You need the administrator role. Custom mappings are in the Attribute mappings list of a SCIM configuration, under Access & security → Authentication → SCIM configurations.
Default user mappings
Servicely applies these mappings to every user. It ignores any other attribute unless a custom mapping handles it.
| Source field | Target field | Mapping |
|---|---|---|
userName |
User name | Identifies the user. Servicely refuses a new user whose user name is taken. |
id |
External key | Copied. |
externalId |
External key | Copied. When both are sent, this one is kept. |
active |
Active | Copied. A disabled account becomes an inactive user. |
name.givenName |
First name | Copied. |
name.familyName |
Last name | Copied. |
title |
Title | Copied. |
preferredLanguage |
Preferred language | Copied. |
timezone |
Time zone | Copied. |
emails |
The first address that is primary or of type work. Otherwise the last address sent. | |
phoneNumbers[type eq "work"] |
Desk phone | Copied. |
phoneNumbers[type eq "mobile"] |
Mobile | Copied. |
employeeNumber in the enterprise user extension |
Employee number | Copied. |
manager in the enterprise user extension |
Manager | The manager’s Servicely user. |
Default group mappings
| Source field | Target field | Mapping |
|---|---|---|
displayName |
Name | Identifies the group. Servicely refuses a new group whose name is taken. |
id |
External key | Copied. |
externalId |
External key | Copied. When both are sent, this one is kept. |
members |
The group’s members | Each member is a Servicely user. |
Microsoft Entra ID user mapping changes
Microsoft Entra ID maps its own attributes to SCIM attributes in the enterprise application’s provisioning settings. Its default user mapping needs these changes for Servicely. The group mapping needs none.
| Target attribute | Change | Reason |
|---|---|---|
externalId |
Change the source attribute from mailNickname to objectId. |
The user’s External key then holds the Microsoft Entra ID object ID. |
displayName |
Delete the mapping. | Servicely does not store the attribute. |
name.formatted |
Delete the mapping. | Servicely does not store the attribute. |
addresses[type eq "work"] attributes |
Delete the mappings, unless a custom mapping reads them. | No default mapping reads an address. |
phoneNumbers[type eq "fax"].value |
Delete the mapping. | No default mapping reads a fax number. |
Custom mapping fields
A custom mapping handles one SCIM attribute for one SCIM configuration. It adds an attribute the default mappings ignore, or changes what a default mapping stored.

| Field | Type | Required | Behaviour | Purpose |
|---|---|---|---|---|
| Name | Text | No | None. | Says what the mapping does. |
| Active | Yes or no | No | Servicely runs only active mappings. | Turns the mapping on. |
| Schema | Choice | Yes | User or Group. | The kind of record the mapping applies to. |
| Attribute | Choice | Yes | A top-level SCIM attribute, such as emails or addresses, or an extension. |
The attribute the scripts receive. One mapping handles the whole attribute. |
| Description | Text | No | None. | Notes for other administrators. |
| Inbound script | Script | No | Runs after the default mappings, when the identity provider creates or updates the record. | Sets fields on the user or group from the SCIM data. |
| Outbound script | Script | No | Runs when the identity provider reads the record. | Builds the SCIM value from the user or group. |
The two scripts are inverses of each other. Microsoft Entra ID compares what the outbound script returns with its own value to decide whether to send an update.
Script variables
| Variable | Available in | Description |
|---|---|---|
current |
Both scripts | The user or group record. |
attributeData |
Both scripts | The value of the mapping’s attribute in the SCIM data. Empty when the identity provider did not send it. |
scimData |
Both scripts | The whole SCIM user or group. |
schema |
Both scripts | The mapping’s Schema: user or group. |
attribute |
Both scripts | The mapping’s Attribute. |
answer |
Outbound script | Set it to the value to return for the attribute. |
Examples
Servicely supplies two inactive example mappings on its example SCIM configuration. One sets a user’s department and company. The other reads the country of the work address into a Country field that you add to the User table.
Department and company
The mapping has Schema User and Attribute urn:ietf:params:scim:schemas:extension:enterprise:2.0:User. It creates a department or company that does not exist yet.
Inbound script
// attributeData holds the enterprise user extension, for example
// { "organization": "A1A Car Wash", "department": "<department>" }
if (attributeData) {
let departmentName = attributeData.department;
let companyName = attributeData.organization;
if (departmentName) {
let department = Table("Department").EQUAL("Name", departmentName).firstOrNull();
if (!department) {
department = Table("Department").newRecord().Name(departmentName).create();
}
current.Department(department.ID());
}
if (companyName) {
let company = Table("Company").EQUAL("Name", companyName).firstOrNull();
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 mapping stores a group’s email address in C_Email, an example of a field you add to the Group table. It has Schema Group and Attribute urn:ietf:params:scim:schemas:extension:Servicely:2.0:Group, and expects the address in that extension’s extensionAttribute1.
In Microsoft Entra ID, the group mapping sends mail to the target attribute urn:ietf:params:scim:schemas:extension:Servicely:2.0:Group:extensionAttribute1. Microsoft describes how to add a target attribute in Customize Microsoft Entra attribute mappings in Application Provisioning.
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;