我的问题是:不使用powershell命令可以获得azure活动目录租户id吗?

我找到了这两个博客,有了这个帮助,我已经能够从powershell获得租户ID和订阅ID。这是找回房客的唯一方法吗?

在Windows PowerShell中获取Windows Azure活动目录租户ID

Windows Azure AD认证支持PowerShell

谢谢


当前回答

For AAD-B2C it is fairly simple. From Azure Portal with a B2C directory associated, go to your B2C directory (I added the "Azure AD B2C" to my portal's left menu). In the B2C directory click on "User flows (policies) directory menu item. In the policies pane click on one of your policies you previously added to select it. It should open a pane for the policy. Click "Properties". In the next pane is a section, "Token compatibility settings" which has a property "Issuer". Your AAD-B2C tenant GUID is contained in the URL.

其他回答

为我工作的是这个(az登录后):

 az account show |grep tenantId | awk {'print $2'} |tr -d '[:punct:]'

进入Azure门户> Azure活动目录。 在主屏幕上,您应该看到您的租户ID。

以下答案来自微软网站,最后更新日期为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。

希望这能有所帮助。

步骤1:登录Microsoft Azure门户

步骤2:搜索Azure Active目录

步骤3:单击overview,从租户信息部分找到租户id

访问https://login.windows.net/YOURDIRECTORYNAME.onmicrosoft.com/.well-known/openid-configuration,您将看到一堆包含租户ID的url。