我的问题是:不使用powershell命令可以获得azure活动目录租户id吗?
我找到了这两个博客,有了这个帮助,我已经能够从powershell获得租户ID和订阅ID。这是找回房客的唯一方法吗?
在Windows PowerShell中获取Windows Azure活动目录租户ID
Windows Azure AD认证支持PowerShell
谢谢
我的问题是:不使用powershell命令可以获得azure活动目录租户id吗?
我找到了这两个博客,有了这个帮助,我已经能够从powershell获得租户ID和订阅ID。这是找回房客的唯一方法吗?
在Windows PowerShell中获取Windows Azure活动目录租户ID
Windows Azure AD认证支持PowerShell
谢谢
当前回答
以下答案来自微软网站,最后更新日期为2018年3月21日:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal
简而言之,以下是攻略的截图:
选择Azure Active Directory。
要获取租户ID,请为Azure AD租户选择Properties。
复制目录ID。这个值是您的租户ID。
希望这能有所帮助。
其他回答
PowerShell:
Add-AzureRmAccount #if not already logged in
Get-AzureRmSubscription -SubscriptionName <SubscriptionName> | Select-Object -Property TenantId
进入Azure门户> Azure活动目录。 在主屏幕上,您应该看到您的租户ID。
使用Azure CLI
az account get-access-token --query tenant --output tsv
以下答案来自微软网站,最后更新日期为2018年3月21日:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-service-principal-portal
简而言之,以下是攻略的截图:
选择Azure Active Directory。
要获取租户ID,请为Azure AD租户选择Properties。
复制目录ID。这个值是您的租户ID。
希望这能有所帮助。
如果你已经安装了Azure CLI,你可以运行下面的命令,
az account list
或者在~/.azure/credentials中找到它