Press "Enter" to skip to content

“The browser based authentication dialog failed to complete. Reason: The server or proxy was not found.” Error when running Add-AzureAccount in Azure Powershell

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.
01_IE_Default

Re-running the Add-AzureAccount command resulted in the expected sign-in window.
02_Add_AzureAccount

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

  1. Alessio Lombardi Alessio Lombardi

    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

Leave a Reply

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