In this post I will show you 3 easy ways to find Azure Tenant ID.
Azure AD is trusted to authenticate users, services, and devices for Azure subscriptions when you create an Azure account and add a subscription. A tenant ID is associated with each subscription, and there are several ways to find the tenant ID for your subscription.
There are three ways to find the Azure Tenant ID.
From all three ways, finding Tenant ID through Azure portal is the easiest. Some users, however, love using PowerShell to accomplish their daily tasks. Others, however, prefer to look up their tenant ID via the Azure portal. Here's how each of these methods works.
Find Tenant ID through Azure portal
You can find Tenant ID through Azure portal by following the steps below.
You can also find the tenant ID by clicking Properties in the left pane of the Azure portal. It should also display the tenant ID.
PowerShell commands can be used to find Azure Tenant ID.
This cannot be done directly since you need to install the Azure PowerShell module first.
Run the PowerShell command as an administrator.
"Install-Module -Name Az"
The PowerShell command Get-AzTenant can also be used to find Azure Tenant ID. Executing this command displays the following information.
If you want to find the Azure Tenant ID via CLI, you can use Azure CLI or Microsoft 365 CLI. You must first download and install Azure CLI. The installation of Azure CLI is not covered in this post.
You have two options for downloading Azure CLI.
Download the MSI installer for the Azure CLI current version. As the beta version does not guarantee product quality, it should not be used in production environments.
Install the current Azure CLI version on your server. Now let's find the Azure tenant ID.
Run PowerShell or Command Prompt as an administrator. Type Az login. The CLI opens your default browser and loads a sign-in page for Azure if it can. When you run the Az login command, you can specify a default browser if you haven't already.
Run the Az account tenant list command. An extension account installation is prompted when you run this command. Install the extension and you should see the Azure Tenant ID in the output.