How to find your Azure Active Directory tenant ID

Azure subscriptions have a trust relationship with Azure Active Directory (Azure AD). Azure AD is trusted to authenticate users, services, and devices for the subscription. Each subscription has a tenant ID associated with it, and there are a few ways you can find the tenant ID for your subscription.

Find tenant ID through the Azure portal

  1. Sign in to the Azure portal.

  2. Select Azure Active Directory.

  3. Select Properties.

  4. Then, scroll down to the Tenant ID field. Your tenant ID will be in the box.

Azure Active Directory - Properties - Tenant ID - Tenant ID field

Find tenant ID with PowerShell

You can also find the tenant programmatically. To find the tenant ID with Azure PowerShell, use the cmdlet Get-AzTenant.

Connect-AzAccount
Get-AzTenant

For more information, see this Azure PowerShell cmdlet reference for Get-AzTenant.

Find tenant ID with CLI

If you want to use a command-line interface to find the tenant ID, you can do so with Azure CLI or Microsoft 365 CLI.

For Azure CLI, use one of the commands az login, az account list, or az account tenant list as shown in the following example. Notice the tenantId property for each of your subscriptions in the output from each command.

az login
az account list
az account tenant list

For more information, see az login command reference, az account command reference, or az account tenant command reference.

For Microsoft 365 CLI, use the cmdlet tenant id as shown in the following example:

m365 tenant id get

For more information, see the Microsoft 365 tenant id get command reference.

Next steps