在 PowerShell 中运行
Login-AzureRmAccount
时出现此错误:
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
我看到登录窗口短暂弹出,但它立即关闭并显示此错误消息。
事实证明我的代理设置阻止我连接到互联网。更正代理设置后,我就能够按预期登录 Azure。不确定“无效语法”错误是怎么回事......
运行 add-azureaccount 它将要求提供凭据,输入凭据。 然后运行 Connect-azAccount 它会再次要求凭据,提供凭据,它将正常工作
转到“开始”->“Internet 属性”并删除所有浏览历史记录(对我有用)。 cookie/缓存可能已过期。