Search code examples
azureadalazure-powershell

Azure PowerShell Login: browser based authentication dialog failed to complete


I'm getting this error when running Login-AzureRmAccount in PowerShell:

Login-AzureRmAccount : The browser based authentication dialog failed to complete. Reason: The request could not be 
processed by the server due to invalid syntax.
At line:1 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
    + FullyQualifiedErrorId : Microsoft.Azure.Common.Authentication.AadAuthenticationFailedException,Microsoft.Azure.Comm 
   ands.Profile.AddAzureRMAccountCommand

I see the login window pop up briefly, but it closes immediately and this error message displays.


Solution

  • It turned out my proxy settings were preventing me from connecting to the internet. Once I corrected my proxy settings I was able to log into Azure as expected. Not sure what the "invalid syntax" error is all about...