发生 Azure Cloud Shell 凭据问题

问题描述 投票:0回答:1

我尝试使用 Azure cloud shell ,在执行“az login”命令期间出现此错误:

A Cloud Shell credential problem occurred. When you report the issue with the error 
below, please mention the hostname 'SandboxHost-638476176132956009'

Failed to authenticate 8fa2a577-763e-4f76-81a0-dc97d1871254 'Turnberry Solutions Inc' 
due to error 'AADSTS50079: Due to a configuration change made by your administrator, or 
because you moved to a new location, you must enroll in multi-factor authentication to 
access '797f4846-ba00-4fd7-ba43-dac1f8f63013'. Trace ID: 68d3e4e5-8977-45de-828d- 
e0dd8f717300 Correlation ID: e22260b7-b461-4c2b-afd4-8542bd7dd5ce

我可能遗漏了一些东西,但是当在Azure Cloud Shell中执行“az login”命令时,当我打开新网页进行登录时,它会要求shell提供的代码(例如“打开页面https://microsoft”) .com/devicelogin 并输入代码 BQA3CDBHQ 进行身份验证。")
当我在显示“输入代码。输入您的应用程序或设备上显示的代码”的窗口中输入此代码时。然后出现一个窗口“选择一个帐户。您正在位于美国的另一台设备上登录 Microsoft Azure 跨平台命令行界面。如果不是您,请关闭此页面。” - 此窗口显示我当前的帐户,状态为“已登录”。然后,当我单击我的当前帐户时,会出现一个窗口,其中显示问题“您是否正在尝试登录 Microsoft Azure CLI?仅当您从信任的商店或网站下载该应用程序时才继续。”当我单击“继续”按钮时,会出现一个窗口,显示“Microsoft Azure 跨平台命令行界面

您已在设备上登录 Microsoft Azure 跨平台命令行界面应用程序。您现在可以关闭此窗口。”当我关闭选项卡时,在 cloud shell 中我看到此错误: `出现 Cloud Shell 凭据问题。当您报告错误问题时
下面,请提及主机名 'SandboxHost-638476176132956009'

 Failed to authenticate 8fa2a577-763e-4f76-81a0-dc97d1871254 'Turnberry Solutions Inc' 
 due to error 'AADSTS50079: Due to a configuration change made by your administrator, 
 or because you moved to a new location, you must enroll in multi-factor authentication 
 to access '797f4846-ba00-4fd7-ba43-dac1f8f63013'. Trace ID: 6360d017-14ae-4981-b5ff- 
 605e75807500 Correlation ID: b0f0ff80-2b95-4f0f-ac91-41ac15b33bb0`

在此过程中,它不会要求 2FA 组合(可能是因为我已经登录?)在我的 Microsoft 帐户页面的“安全”文件夹中,所有“证明您身份的方法”选项均已启用:通过电子邮件发送代码、发送代码、发送登录通知、从身份验证器应用程序输入代码等。这些方法用于“帐户验证”,而不用于“帐户登录”(仅密码选项用于“帐户登录” ),并且我没有看到强制使用“帐户登录”的附加方法的方法。
当然,我的两步验证已开启。 我在这里缺少什么?

azure credentials azure-cloud-shell
1个回答
0
投票

错误 “AADSTS50079:由于管理员进行配置更改,或者由于您移动到新位置,您必须注册多重身份验证才能访问“797f4846-ba00-4fd7-ba43-dac1f8f63013”通常发生在需要 MFA 时。您需要再次以交互方式重新进行身份验证。

我为用户启用了 MFA

enter image description here

我使用启用了 MFA 的帐户登录到

az cli

enter image description here

enter image description here

az login

enter image description here

要解决此问题,从 Azure 门户注销并清除与非 MFA 帐户关联的缓存并执行新的身份验证流程。

  • 如果问题仍然存在,尝试登录 Azure 门户并在隐身窗口中执行
    az login
  • 使用
    az login --tenant TenantID
    命令。

参考资料:

az login
由于 MFA 失败 · 问题 #6962 · Azure/azure-cli · GitHub

如何使用 powershell 通过 MFA 登录 Azure? - Stack Overflow 由我

© www.soinside.com 2019 - 2024. All rights reserved.