---
title: "SCIM attribute mappings"
site: admin
version: 1.11
versions: "all"
url: https://docs-new.servicely.ai/admin/1.11/access/scim-attribute-mappings/
type: reference
application: sso
last_updated: 2026-10-18
commit: c05803eee2ce
---


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](page:access/set-up-scim-provisioning).

## 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"]` | Email | |
| `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.

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-15.png" size="58">The example Country mapping with its inbound and outbound scripts.</Image>

### 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.

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-16.png" size="54">The example mapping for the enterprise user extension.</Image>

Inbound script:

```javascript
// 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:

```javascript
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**.

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-4.png">The Edit attribute list for customappsso link on the group mapping screen.</Image>

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

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-5.png">The new extension attribute added to the attribute list.</Image>

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

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-17.png" size="58">The Edit Attribute dialog with mail as the source attribute.</Image>

The group mappings then include the new attribute.

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-6.png">The group mappings list with the email mapping added.</Image>

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`.

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-18.png" size="84">The Group email mapping record in Servicely.</Image>

Inbound script:

```javascript
if (attributeData?.extensionAttribute1) {
    current.C_Email(attributeData.extensionAttribute1);
}
```

Outbound script:

```javascript
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. |

<Image src="asset:screenshots/admin/access-scim-attribute-mappings/image-19.png" size="68">The Key field on a SCIM configuration.</Image>

## Related

- [Set up SCIM provisioning from Entra ID](page:access/set-up-scim-provisioning)
- [Group fields](page:access/groups)
- [Set up single sign-on with Microsoft Entra ID](page:access/sso-microsoft-entra-id)
