Receiving the following error using the Microsoft Azure Active Directory Connect tool.

'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown.

This program was running fine. Have tried reinstalling the program, restarting the server, and restarting the Microsoft Online Services Sign-in Assistant service.

Microsoft Azure Active Directory Connect authentication error


Make sure you don't have two factor authentication on the account you use for Directory Sync. If you recently enabled it, that would explain the problem.

Also, remember that the passwords expire periodically by default in Office 365. So Directory Sync will quit working periodically and require manual intervention.

Try connecting to Office 365 with PowerShell using the same account and see if you get an error.

As a general best practice, you should make a dedicated in-cloud admin account just for Directory Sync.