Azure Active Directory Sync Error “user_realm_discovery_failed: User realm discovery failed”

This article will show you how to fix the error “user_realm_discovery_failed: User realm discovery failed” which I received while configuring a new Azure Active Directory Connect.

The error can be seen In the sync log and I the actual AD connect wizard.

The reason you get this error Is because you are using a proxy server and Azure AD doesn’t know about It.

To fix It we need to manually specify the proxy address and port In the .NET configuration file In the path:


Simply open the location and locate the file called machine.config

Open the file In notepad

Add the code below (change proxy address to your address) before the last closing tag called /configuration

Proxy Code ( I can’t copy the code to the post because It breacknig the HTML format)

Save the file and try the sync again.