Time changes everything. I was looking to do the same recently and came up with this:
Note
added 02/17/2021
Stable Portal Page thanks Palec
added 12/18/2017
As indicated by shadowbq, the DirectoryId and TenantId both equate to the GUID representing the ActiveDirectory Tenant. Depending on context, either term may be used by Microsoft documentation and products, which can be confusing.
Assumptions
- You have access to the Azure Portal
Solution
The tenant ID is tied to ActiveDirectoy in Azure
- Navigate to Dashboard
- Navigate to ActiveDirectory
- Navigate to Manage / Properties
- Copy the "Directory ID"
Azure ActiveDirectory Tenant ID:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…