Organizations that choose to adopt Office 365 very often have an on-premises environment that is already in place. In such cases, Office 365 acts as an extension to the organization's on-premises environment. From a logistical standpoint, this means extending an existing Active Directory environment to the Office 365 cloud through directory synchronization. Although this tends to be a relatively straightforward process, directory synchronization can go horribly wrong if the existing Active Directory environment is not in a healthy state. Fortunately, Microsoft provides a free tool that can be used to assess the health of your Active Directory environment, and if necessary, fix problems that may exist.
The tool is called the IdFix DirSync Error Remediation Tool. If you think that Microsoft has given this tool an excessively long name, then you aren't alone. Most of the people that I have talked with about this particular tool simply refer to it as IdFix. You can download IdFix from Microsoft here.
It is worth noting that IdFix is an older tool. Officially, it is only supported to work with Windows 7 and Windows Server 2008 R2. The tool can also work with Exchange Server, but Exchange Server is not required. The only supported version of Exchange Server is Exchange Server 2003.