Azure CLI Cheat Sheet
Quick reference for commonly used commands
Authentication
Login
With App ID and client secret
With App ID and certificate
System-managed identities
User-managed identities (any option works)
Identity Enumeration
Whoami
Look up current authenticated identity
Look up a specific identity
View Azure Role Assignments and Permissions
Get
assigneefromaz login ... | jq -r '.[].user.name
View Azure Role Assignments and Permissions (Group)
View Entra ID Group Membership Info
Get all groups a user is a member of, returns group name(s), group ids, and more
Get the group id for a group name (also in the output of previous command)
View Azure Roles Assigned to Group
Get the role definition id(s) for roles assigned to the group
View Azure Role's Permissions
Get the Azure RBAC permissions assigned to the role
Compute
Virtual Machines
List VM Extensions
Security
Key Vault
List Key Vault
List Secrets in Key Vault
Retrieve Secrets from Key Vault
Storage
Storage Account
Enumerate Storage Account Access Keys
Enumerate Storage Accounts
Storage Containers
List Storage Containers
Get
account-namefromaz storage account list | jq -r '.[].name'
Restore Deleted Storage Container
Check if Versioning is Enabled on Container
Like AWS S3 objects, Azure supports versioning of data too
Blobs (files)
View Blobs in Container
Get
container-namefromaz storage container list... jq -r '.[].name'
Check Available Blob Versions
--include vshows versions of the blobs
Stream Blob Content
View file contents without downloading the file
Get
version-idfrom checking the blob versions
Download Blobs
Downloads the file to the destination
Get
version-idfrom checking the blob versions
Tables
List Storage Tables
Query Storage Entities
These exist within a Storage Table
Last updated
Was this helpful?