我想使用Azure CLI检索租户名称
编辑: 当我调用azure account list时,由于我使用公司电子邮件登录,因此无法在提供的域中获取用户名。
THIS-THING-HERE.onmicrosoft.com
,但在文档中找不到。编辑: 当我调用azure account list时,由于我使用公司电子邮件登录,因此无法在提供的域中获取用户名。
[
{
"cloudName": "AzureCloud",
"id": "46ee2f65-7112-4c96-ad0a-3ff6ca22a615",
"isDefault": true,
"name": "Visual Studio Professional",
"state": "Enabled",
"tenantId": "1caf5d6b-58cb-40e6-88b3-eb9ab9c0c010",
"user": {
"name": "a.krajniak@avanade.com",
"type": "user"
}
},
{
"cloudName": "AzureCloud",
"id": "1efd84d6-173f-42cc-80db-7b2c17eb0edd",
"isDefault": false,
"name": "Microsoft Azure Enterprise",
"state": "Enabled",
"tenantId": "c48d02ad-7efd-4910-9b51-ebb7a4b75379",
"user": {
"name": "a.krajniak@avanade.com",
"type": "user"
}
}
]
az account tenant list
一样简单。 - Cristian E.