browse
az/Azure CLI
MicrosoftCross-platform command line interface for managing Microsoft Azure cloud resources and services.
Cloud ProvidersJSON
01Agent Notes
Azure CLI defaults to JSON output - no extra flag needed. Uses `az <service> <action>` pattern. Use `--query` with JMESPath for server-side filtering. Most list commands support `--query "[].{name:name, id:id}"` for projection. Use `az account set -s <sub>` for subscription context.
02Global Flags
| Flag | Type | Description |
|---|---|---|
--subscription | string | Azure subscription ID or name |
--output/-o | enum [json, table, tsv, yaml, jsonc] | Output format |
--query | string | JMESPath query string for filtering output |
--verbose | boolean | Increase logging verbosity |
03Authentication
Methods
environment-variablesconfig-filemanaged-identityservice-principal
Env vars
AZURE_SUBSCRIPTION_IDAZURE_TENANT_IDAZURE_CLIENT_IDAZURE_CLIENT_SECRETConfig files
~/.azure/Setup
az login04Install
brew install azure-cli05Capabilities
Reference
binary
azcheck
az versionauth
environment-variables, config-file, managed-identity, service-principalformats
json, table, tsv, yaml, jsoncjson flag
-o jsonversion
2.84.0