How to fix the User realm discovery failed error while configuring Azure AD Connect.
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.
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.
[clickToTweet tweet=”Fix User Realm Discovery Failed Error in Azure AD Connect” quote=”Fix User Realm Discovery Failed Error in Azure AD Connect”]
Cloud Architect & Blogger with interests in Office 365, Enterprise Mobility & Security and Azure. I am active on Experts Exchange & TechNet forums and I am a technical author for SearchExchange. Follow me on Twitter, LinkedIn, Facebook or Google+ for the latest updates. For consultancy opportunities, drop me a line.