How to Create a Custom Attribute in Active Directory
The creation of a new custom attribute can be required for applications’ integration, AD-based customized message routing or adding specific flags on Active Directory objects. This is an easy task to do but is not a reversible operation – If a custom attribute was created in Active Directory, it cannot be removed.
This Wiki article shows how a new Active Directory custom attribute can be created and linked to a class.
Installation of Active Directory Schema Snap-In
Active Directory Schema is an administrative tool that can be used for Active Directory Schema updates and changes. To install it, you need to run regsvr32 schmmgmt.dll command using an elevated prompt (Using Run as administrator option).
Once Active Directory Schema administrative tool is installed, it will be available on MMC.
Creation of a new Active Directory Attribute
To create a new Active Directory attribute, proceed like the following:
- In the Active Directory Schema administrative tool, do a right-click on Attributes and then select Create Attribute…
- Click on Continue (The warning that is displayed is to inform that the creation of a new Active Directory attribute is not a reversible operation and that it cannot be removed once done)
- Populate the following information:
- Common Name
- LDAP Display Name
- Unique X500 Object ID (http://gallery.technet.microsoft.com/scriptcenter/56b78004-40d0-41cf-b95e-6e795b2e8a06)
- Description (Optional)
- Syntax (http://technet.microsoft.com/en-us/library/cc961740.aspx)
- Minimum (Optional)
- Maximum (Optional)
- Multi-Valued (Enable it only if you would like to have a multi-valued attribute)
Adding the attribute to a class
The created attribute can be added to one or more Active Directory classes. To do that, proceed like the following:
- On Active Directory Schema administrative tool, go to Classes, select the class to update then go to its properties:
- Go to Attributes tab, click on Add…. Once done, select the attribute to add and click OK.
See Also
- How to deactivate Schema Objects in Active Directory
- How to get the list of deactivated Schema Objects in Active Directory using Powershell