如何獲取Azure Tenant的Tenant Id?
來源:程序員人生 發布時間:2017-04-08 13:36:48 閱讀次數:10669次
在知道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

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈