Introduction
The on-premise Active Directory is designed with the built-in schema for all object types, including user, group, and computer. But sometimes, these attributes are not enough for business needs. In such a scenario, the administrator can create a custom attribute and add those attributes to object types.
For example, the “Car Insurance Expiry Date” attribute is unavailable by default in the Active Directory schema. However, this attribute can be created to integrate with applications. Using this attribute, businesses can send notifications to customers regarding their insurance expiration dates.
In this article, I will guide you through the process of creating a custom attribute in the On-Premises Active Directory. After that, I will show you how to sync those attributes with Entra ID.
Create Custom active directory attributes.
In my environment, I already deployed Entra Connect Sync software to sync on-premise objects and their default attributes with Entra ID.
- First, we must create a custom attribute and run the command regsvr32 schmmgmt.dll on your domain controller.

- After that, type mmc in the Run section and navigate to File–>Add/Remove snap-ins–>Active Directory Schema–>Add–>OK.
- On the Active Directory Schema, right-click the Attributes Container –>Create New Attribute–>Continue and fill out the form as shown below. I used the Microsoft script to obtain the Unique X500 Object ID.

- After that, navigate to Classes–>Double Click user–>Attributes–>Add–>Select “Car Insurance Expiry Date” attribute–>Apply–>OK.

- Restart the Active Directory Domain Services to make this attribute available for all user objects.
- Now, you can see the custom attribute available for user accounts.

Sync custom attributes with Entra ID
In the previous section, we created a custom attribute, “Car insurance Expiry Date,” available for all user objects to integrate with on-premise applications.
Now it’s time to sync this directory extension attribute to Entra ID so that Cloud-based applications can use it.
- To do that, On the Entra Connect Sync server, launch the Entra Connect Sync wizard–>Select Refresh Directory Schema.

- Connect to Entra ID using Hybrid Identity Administrator Credentials.
- Enable the directories that wish to refresh the schema. In my case, I selected msetlab.com.

- Select “Configure” on the Ready to Configure wizard page.

- Once the configuration is completed, press the Exit button.
- Again, launch the Entra Connect Sync wizard, choose Customise synchronization options, –>Move further until you reach the Directory extensions wizard page.
- Add the custom attribute we created from the “Available Attribute” to the “Selected Attributes” section–>Click Next –> Click Next.

- Click Configure–>Complete the configuration wizard.

- Update the custom attribute for users and initiate a delta sync to see those attributes appear in Entra ID.

Note: During the Entra Connect Sync deployment, the wizard creates an app, “Tenant Schema Extension App,” registered in your tenant, where this app stores all extended attributes synced from on-premise AD.
- Sign in to MsGraph Explorer and to verify the value.

- Alternatively, you can verify the value using the Azure AD cmdlet, Get-AzureADUserExtension.

Conclusion
Microsoft Entra ID enables organizations to sync their on-premises Active Directory attributes with cloud-based applications. This feature allows organizations to use on-premises custom attributes in the cloud while maintaining control over them on-premises. I believe this guide will help you seamlessly sync custom attributes to Entra ID via Entra Connect Sync.





Recent Comments