---
title: Directory attribute mappings in Directory Sync
description: See which directory attributes Directory Sync writes to each OpenLM user property in OpenLM Version 26, and map a custom attribute to one of them.
product: OpenLM Version 26 (legacy)
---

> **OpenLM Version 26 (legacy).** This page documents the legacy product, not OpenLM Platform.

To see which directory attribute fills each property of an OpenLM user, use the table on this page. If your directory keeps a value in an attribute of its own, you can map that attribute to one that Directory Sync reads.

## Default mappings

When a sync runs, Directory Sync reads the following attributes from the directory and writes them to the properties of the user in OpenLM SLM. The table applies to Active Directory, eDirectory, ApacheDS, and Microsoft Entra ID:

| OpenLM user property | Directory attribute |
| --- | --- |
| Username | The attribute you select in **Sync attribute**: `cn`, `sAMAccountName`, or `userPrincipalName` for Active Directory, `cn` for eDirectory and ApacheDS, and `userPrincipalName` for Microsoft Entra ID |
| Email | `mail` |
| FirstName | `givenname` |
| LastName | `sn` or `surname` |
| DisplayName | `displayname` |
| Phone | `telephonenumber` |
| Title | `title` or `jobtitle` |
| Department | `department`. For eDirectory, `ou`. |
| Description | `description` |
| Office | `physicaldeliveryofficename` |
| MobilePhone | `mobile` or `mobilephone` |
| Country | `co` or `country`. Directory Sync uses `c` only when `co` has no value. |

To choose which of these attributes a sync reads, see the **Sync attribute** options in [Directory Sync v2x configuration](https://www.openlm.com/documentation/legacy/directory-sync/configuration#object-tab).

## Map a custom attribute

If your directory stores a value in an attribute that isn't in the table, map that attribute to one that is. For example, if departments are in a custom `myDepartment` attribute, map it to `department`, and its value fills the **Department** property of each user.

To map a custom attribute:

1. On the machine where the Directory Synchronization Agent (DSA) runs, open the `syncSettings` folder in the DSA installation folder. By default, the installation folder is `C:\Program Files\OpenLM\OpenLM Directory Synchronization Agent`.
2. Open the folder for your directory type:

   | Directory type | Folder |
   | --- | --- |
   | Active Directory | `msDirectorySyncSettings` |
   | eDirectory, ApacheDS | `novellDirectorySyncSettings` |
   | Microsoft Entra ID | `azureAdSyncSettings` |
   | Google CDS | `googleDSSyncSettings` |
   | Okta Directory | `oktaSyncSettings` |

3. Open the `customAttributeMappings.json` file in a text editor.
4. Add one line for each mapping. Enter your custom attribute first, and then the attribute from the table that it fills:

   ```json
   {
     "myDepartment": "department",
     "myCustomOfficeAttribute": "physicaldeliveryofficename"
   }
   ```

   In this example, the value of `myDepartment` goes to the **Department** property, and the value of `myCustomOfficeAttribute` goes to the **Office** property.

5. Save the file before the next sync starts. You don't need to restart the DSA.

Keep these points in mind when you edit the file:

- **The mapped attribute replaces the standard one.** After you map `myDepartment` to `department`, Directory Sync no longer reads the directory's own `department` attribute. To sync the standard attribute again, remove the line from the file.
- **Three files already contain mappings.** The files for Microsoft Entra ID, Google CDS, and Okta Directory come with the mappings that Directory Sync needs for the attribute names of those directories. Keep those lines and add yours.
- **The other files contain placeholders.** The files for Active Directory, eDirectory, and ApacheDS come with two example lines, `ldapAttribute` and `ldapAttribute2`. Replace them with your mappings.
