Azure, Cloud

How to get Azure Active Directory Tenant ID and Subscription ID

To get your Tenant ID, you can use PowerShell or the Azure Portal.

You have two options with PowerShell, first option is using

 

which directly gives you your Subscription ID as well as your default Tenant ID.


Second option is using Add-AzureAccount and Get-AzureAccount

 

This has the advantage of giving you the output of all tenants as well as subscriptions you’re account is assigned to: