User Realm Discovery Failed – AAD Connect Error

How to fix the User realm discovery failed error while configuring Azure AD Connect. 

More...

I was at a customer site upgrading the DirSync solution into Azure AD Connect platform by doing a parallel deployment. The environment had a proxy and was WPAD aware. While configuring AAD Connect, the error popped up!

We encountered a problem and couldn't complete the integration. An error occurred executing Configure AAD Sync task : user_realm_discovery_failed: User realm discovery failed.

user realm discovery failed error

While all the online solutions was pointing to configuring a proxy url and port in the machine.config file within ​C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Config on the AAD Connect server, I wanted to configure the server not to use a proxy. The customer had moved the proxy solution to a next gen firewall, but the environment had the "remains" of the WPAD configuration ;)

My solution was to navigate to C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Config and open the machine.config file using notepad (run as administrator). The below code was added just above the </configuration> tag and AAD Connect got past the configuration page with no issues.​

<system.net>

<defaultProxy enabled="false"></defaultProxy>

</system.net>

Machine.config file AAD Connect

[clickToTweet tweet=”Fix User Realm Discovery Failed Error in Azure AD Connect” quote=”Fix User Realm Discovery Failed Error in Azure AD Connect”]

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.