在Azure上使用Terraform很长一段时间,它工作得很好。现在,由于某种原因,az cli命令不起作用。我得到以下错误:
AADSTS500200: User account 'xxxx ' is a personal Microsoft account. Personal Microsoft accounts are not supported for this application unless explicitly invited to an organization. Try signing out and signing back in with an organizational account.
我已经将azcli版本升级到2.42,但问题仍然存在。即使使用隐身模式也无法登录Azure。而不是使用az登录,通过浏览器,我能够登录到azure云没有问题。
问题与Az cloud list有关。活跃的azure云是"azureusgovernment";而不是"azurecloud"。启用"azurecloud"后;
az cloud set --name AzureCloud
尝试下面的命令来清除缓存。
az account clear
az login
或
az login --tenant [tenant id]