AzCLI

Common Commands

Login without a sub

az login --allow-no-subscriptions

Logout of All Contexts

az logout
az account clear

Log into Specific Tenant

az login --tenant $tenant

Show All Subscriptions

az account list
az account management-group list --query "[].{id:id,name:name}" -o tsv | while read -r mgid name; do 
	az policy assignment list --scope "$mgid" >> $name
done