Skip to content
Azure Lessons
Azure Lessons
  • Home
  • AWS
  • Azure
    • Azure Virtual Machine
    • Azure Active Directory
    • Azure CLI
    • Azure CLI Commands List
    • Azure Cognitive Services
    • Azure Cosmos DB
    • Azure DevOps
    • Azure Functions
    • Azure PowerShell Commands
    • Azure Sentinel
    • Azure SQL
    • Azure Storage
    • Azure Synapse
  • Blogs
  • FREE EBOOK

az account show

October 31, 2023October 31, 2023 by Rajkishore

In this Azure CLI tutorial, we will discuss the Az account show command with examples.

Table of Contents

  • az account show
    • Syntax
    • Example-1: Get the output in the JSON format
    • Example 2: Get the output in a tabular format
    • Example 3: Get the details of the specified subscription
  • Az account show – Video Tutorial
  • Wrapping Up

az account show

This is an excellent Azure command that can help you to check the details like tenantId, user name, type, environmentName, homeTenantId, id, state, etc., using the az account show cmdlet.

Syntax

az account show
az account show --output table
az account show --subscription 'Your subscription name'

Example-1: Get the output in the JSON format

Once you will run the above command. You will get the output in the JSON format as shown below

{
  "environmentName": "AzureCloud",
  "homeTenantId": "5d9d690a-0310-474d-ae8b-42df2d549228",
  "id": "1cdf4300-dee5-cccc-9c9c-feaa72a5cbd1",
  "isDefault": true,
  "managedByTenants": [],
  "name": "Visual Studio Enterprise",
  "state": "Enabled",
  "tenantId": "5d9d690a-cccc-474d-ae8b-ghyf2d549228",
  "user": {
    "name": "fewlines4biju@hotmail.com",
    "type": "user"
  }

You can check out the same output in the screenshot below, where I ran the az account show command and got the expected output.

az account show

Example 2: Get the output in a tabular format

If you want to see the output in a table format, you can use the below cmdlet

az account show --output table

After executing the above command, I got the output as expected. You can check out the screenshot below.

az account show --output table

Example 3: Get the details of the specified subscription

If you want to retrieve the account details based on the subscription name, use the below cmdlet. In this example, “Visual Studio Enterprise” is the subscription name.

az account show --subscription 'Visual Studio Enterprise'

After executing the above command, I got the expected output as below. See the below screen shot.

az account show powershell

Az account show – Video Tutorial

You may also like following the articles below

  • az account list
  • How to install Azure CLI on Mac
  • How To Open Azure PowerShell

Wrapping Up

Well. in this article, we have discussed the AZ account show that can help you retrieve the connected user account details using Azure CLI.

I hope you have enjoyed this article !!!

Microsoft Azure
Rajkishore

I am Rajkishore, and I am a Microsoft Certified IT Consultant. I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machines, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.

The call is ambiguous between the following methods or properties
Run Multiple Azure Functions Locally
Subscribe To Our YouTube Channel Subscribe to AzureLessons YouTube Channel

Recent Posts

  • Azure synapse Analytics Tutorial
  • Azure VM Backup Pricing
  • Azure VM
  • What Is Edge Location In AWS
  • DP-300 Certification
  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
© 2026 Azure Lessons
Azure
Virtual
Machine
By: Rajkishore
Azure Consultant
PDF

Free 25+ page PDF

Download free Azure Virtual Machine PDF

Download our free 25+ page Azure Virtual Machine guide and master cloud deployment today!

No spam, ever. You will also get new Azure tutorials by email. Unsubscribe any time. Privacy policy

Check your inbox

Your Azure Virtual Machine PDF is on its way to . Can't find it in a few minutes? Look in your Promotions or Spam folder.