请考虑以下几点:
// create a new service principal
PS C:\Users\myUser> az ad sp create-for-rbac
The output includes credentials that you must protect. Be sure that you do not include these credentials in your code or check the credentials into your source control. For more information, see https://aka.ms/azadsp-cli
{
"appId": "...",
"displayName": "...",
"password": "...",
"tenant": ".."
}
// list service principals created by me
PS C:\Users\myUser> az ad sp list --show-mine
[]
为什么第二个命令az ad sp list --show-mine
不显示先前创建的服务主体?
1条答案
按热度按时间8ehkhllq1#
我已经在我的环境中进行了复制,并获得了如下预期结果,我遵循了以下流程:
首先,我使用
az login
登录Azure:然后运行以下命令:
然后运行以下命令:
然后运行以下命令:
您将获得显示创建的服务主体,因为我得到了显示。