做一个公司内部用的小系统,希望使用者可以直接使用他们自己的 Office 365 帐号登录(感谢公司使用 Office 365)。在设置OpenID Connect 的时候,需要用到我们公司 Office 365 的 Tenant ID,怎么才能得到呢?我并不是公司内 Office 365 的管理员。所以最好通过其它途径获得。而这个官方文档里说明了我们可以通过 Powershell 来得到。

Use Windows PowerShell

You can use Windows PowerShell to find the tenant ID. You’ll need the Microsoft Azure PowerShell module.

Open a Microsoft Azure PowerShell command window and run the following script, entering your Office 365 credentials when prompted.

Login-AzureRmAccount

Your tenant ID is listed in the output.

留言

2017-03-11