If you're admin of a Azure AD / office 365 tenant and if you installed AD sync on your onprem servers, you may be familiar with a notification emails receiving to you with the title of "Sync errors detected on your Azure AD Connect service ".

This happened due to the synchronization errors between on premises server and office 365, usually duplicate entries and formatting errors.
in order to solve this problem Microsoft is suggesting a tool called "IdFix" , which is capable of identifying errors such as duplicates and formatting problems in Active Directory Domain Services (AD DS) domain.
IdFix is used to perform discovery and remediation of identity objects and their attributes in an on-premises Active Directory environment in preparation for migration to Azure Active Directory. Below is the link to download the tool.
https://www.microsoft.com/en-us/download/details.aspx?id=36832
Ones you download the tool , here is how you use the tool.
- Download the Zip file and extract, and run the EXE called IdFix with the appropriate permission to the forest. Microsoft recommendation for permission is below.
Permissions: The application runs in the context of the authenticated user which means that it will query the authenticated forest and must have rights to read the directory. If you wish to apply changes to the directory the authenticated user needs write permission to the desired objects.
- Ones open the tool , click on Query , which will be query to entire directory , looking for errors. this will take some time based on the size of your directory.

Ones you run the tool , it will be showing various type of the issue such as duplication , invalid characters , format errors, and so on.. so based on the error type you can apply a action on the action section. refer below screenshot.ones selecting the all actions , you can apply changes to the directory by clicking "Apply"

based on the error type you can reduced number sync errors and you verify the changes by re-running the tool. after fixing all the entries , you can run full sync using Azure AD connect which will resolve your AD sync problem.
Please refer below Microsoft article for detailed description about fixing different type attributes and errors using the IdFix tool.
https://docs.microsoft.com/en-us/office365/enterprise/prepare-directory-attributes-for-synch-with-idfix
Happy Fixing :)











