How to Find Azure Subscription ID using Azure CLI

This blog post will show how to find all your Azure Subscription IDs using Azure CLI.

One of the essential tasks when working with Azure is to find the subscription ID of your Azure account. The subscription ID is a unique identifier that is used to manage Azure resources and services. It is required when creating resources or services, configuring access control, and managing billing.

Get Started

To get started, first log into Azure using the following command.

az login

To list all your Azure subscription IDs, run the command below.

az account list --output table

The subscription details will show up in the output.

Name               CloudName    SubscriptionId                        State    IsDefault
-----------------  ----------  ------------------------------------  -------  -----------
My Subscription    AzureCloud  xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  Enabled  True

Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.