程序员人生 网站导航

如何获取Azure Tenant的Tenant Id?

栏目:服务器时间:2017-04-08 13:36:48
        在知道Azure用户的Tenant名字的时候,如何的得到用户的tenant id呢?这是在实际工作中常常遇到的问题,其实Azure提供了Powershell和UI两种方式帮助你获得tenant id。

Powershell

(Invoke-WebRequest https://login.windows.net/[YOURDIRECTORYNAME].onmicrosoft.com/.well-known/openid-configuration|ConvertFrom-Json).token_endpoint.Split('/')[3]

其实,直接访问上面的URL也能够得到tenant id,Powershell在这里只是帮助你快速找到返回信息中的tenant id。


Azure Portal

------分隔线----------------------------
------分隔线----------------------------

最新技术推荐