[英]AZ CLI login using Service Principal fails from specific computer
I have posted previously about az login
using a Service Principal failing with the error No subscriptions found
and I have run across others that have had similar issues.我之前发布过关于使用服务主体
az login
失败并出现错误No subscriptions found
并且我遇到了其他有类似问题的人。 Capability seems shaky for some reason.出于某种原因,能力似乎不稳定。 What I am seeing now that has me scratching my head is when I run a script I have that does an
az login
with a service principal from my desktop computer it works fine...no issues.我现在所看到的让我摸不着头脑的是,当我运行一个脚本时,我使用台式计算机上的服务主体进行
az login
,它工作正常……没有问题。 When I run the same script from my laptop, the login fails with the No subscriptions found
error.当我从笔记本电脑运行相同的脚本时,登录失败并显示未
No subscriptions found
错误。 What I have tried on the laptop:我在笔记本电脑上尝试过的:
az account clear
to make sure everything was cleared outaz account clear
以确保所有内容都已清除I even ran az account clear
on my desktop to make sure it was not working simply because it was cached and even after the clear, the az login
worked fine.我什至在我的桌面上运行
az account clear
以确保它不能仅仅因为它被缓存而工作,即使在清除之后, az login
也能正常工作。
Any thoughts on what might be causing this?关于可能导致这种情况的任何想法?
I have posted resolution for this under following thread.我已经在以下线程下发布了解决方案。 https://stackoverflow.com/a/66108965/1712969
https://stackoverflow.com/a/66108965/1712969
you might want to try command with this flag "--allow-no-subscriptions"您可能想尝试使用此标志“--allow-no-subscriptions”的命令
您需要为服务原则分配一个角色,或添加标志--allow-no-subscriptions
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.