miniguide

Azure Subscriptions & Tenant Cheatsheet: Manage Your Azure Environment

Introduction

This cheatsheet provides key Azure CLI commands to list, view details, and switch between subscriptions and tenants—essential for managing your Azure environment.

Table of Contents

1. List Subscriptions

az account list --output table

2. Show Subscription Details

az account show --subscription <subscriptionId>

3. Set Active Subscription

az account set --subscription "<subscriptionNameOrID>"

4. List Tenants

az account tenant list --output table

5. Show Tenant Details

az account tenant show --tenant <tenantId>

6. Get Current Account Info

az account show

7. List Subscription Locations

az account list-locations --output table

8. View Subscription Usage

az consumption usage list --subscription <subscriptionId> --output table

9. Update Subscription Tags

az account update --subscription <subscriptionId> --set tags.Environment=Prod

10. List Management Groups

az account management-group list --output table