How Do You Find the Subscription ID for an Azure Account?

Problem scenario
You want to find the subscription ID for your Azure account.  What do you do?

Possible Solution #1
Log into the Azure Portal.  In the upper right click on your account and then click on "My permissions."  You should see an alphanumeric string near your subscription.

Possible Solution #2
Prerequisite

If you have Windows 7 you need to install Azure PowerShell; if you need assistance with this, see this posting.  If you have Windows 10, you need to install the modules for Azure; if you need assistance with this, see this posting.

Procedures
Run this PowerShell script:

Login-AzureRmAccount;
$subscriptions= Get-AzureRmSubscription
$totalvar = "The subscription ID is $subscriptions"
echo " "
echo $totalvar

Possible Solution #3
if you are using the Azure CLI, you can run this command to get the subscription ID:

az account show --query "{subscriptionId:id, tenantId:tenantId}"

Leave a comment

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