Can I modify the DN format of objects created in Active Directory (AD)?
Created: 2012-04-20 08:09:59Modified: 2025-12-18 09:37:04
Tags: Active Directory AD LDS ADAM Custom Mapping Exchange 20xx Features UnitySync
The default DN mapping for creation of a destination AD contact is:
dn=cn=~mail#64~,~struct~
This results is a DN that looks something like this: DN=cn=JSmith@domain.com,ou=SyncContainer,dc=domain,dc=com
IMPORTANT NOTE: When viewing an object created by UnitySync with this default mapping in AD Users and Computers (U&C), the Name column matches the CN value in the DN. This Name value should not be confused with the displayname attribute which is seen in the Global Address List (GAL). If you want to see displayname in AD U&C, select the Displayname column to be viewed.
This default value for CN is preferred because the mail value is far more likely to be unique than displayname (or any name part combination). If you have duplicate name values (i.e. John Smith), subsequent objects with the same name won’t sync, and instead will throw a Duplicate DN error instead. Therefore, using the default DN mapping is strongly recommended.
Having said that, UnitySync is highly configurable and you do have the ability to customize the DN mapping to use a different attribute even though it is not recommended.
Create a custom OBJECT mapfile and modify the first line, which is the DN mapping.
Examples:
dn=cn=~cn#64~,~struct~
dn=cn=~component0#64~,~struct~
Note: Any value surrounded by tilde’s refers to an internal variable generated at sync time.
The value of ~cn~ is will be the displayname value in the format selected on the Display Name tab of the UnitySync User Interface (UI).
The value of ~component0~ is the CN of the source object.
(The #64 is required and will truncate the value at 64 characters if necessary).
If you have a different need for a custom DN mapping, or further questions about this or any other custom mapping, email support@dirwiz.com.
Logs are located in
\UnitySync-v4\Connections\YourConnectionName\Log.