I recently encountered this error when attempting to run Add-AzureAccount using Azure PowerShell on a Windows 8.1 machine. The error occurred regardless of whether I was running PowerShell as a regular user or as Administrator.
The browser based authentication dialog failed to complete. Reason: The server or proxy was not found.
The error message gives little meaningful information but on investigation, it appears to have been caused by the default browser being set to something other than Internet Explorer (in this case, Chrome).
The problem was resolved by setting Internet Explorer as the default browser via IE Settings | Internet Options | Programs | Make default.
Re-running the Add-AzureAccount command resulted in the expected sign-in window.
An alternative is to use a PowerShell function, such as the one available on PoshCode, to switch the default browser to IE before running Add-AzureAccount & then back to the preferred browser after the account has been added.
I attempted to replicate this error on a Windows 7 machine where Chrome was set as the default browser however an error did not result in that case.
One Comment
Thank you, somehow it worked after I set up Explorer as default browser and then restarted VS.
Done once, it kept working also for following accesses on my pc. I work behind an enterprise proxy. Date: 08/08/2017