“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.

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

  1. Alessio Lombardi · · Reply

    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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Kevin Kline

Career and Technical Advice for the IT Professional


Explaining the bits and bytes of SQL Server and Azure

SQL Authority with Pinal Dave

SQL Server Performance Tuning Expert


A blog about PowerShell and general Windows sysadmin stuff

Simon Learning SQL Server

I'm trying to become "better" at SQL Server and data - here's how I'm doing it!

%d bloggers like this: