Azure CLI runs on Windows, macOS, and Linux and is available in Azure Cloud Shell and as a container image. Cloud Shell is useful for browser-based administration without a local installation. For continuous integration and delivery, pin the CLI version or container image so that jobs do not pick up new command behavior unexpectedly. Run az version to see the installed CLI and extension versions, and append --help to a command to check its available arguments and examples.
For interactive administration, sign in with az login and confirm the tenant and subscription with az account show before making changes. In automation, pass the target subscription ID explicitly where supported instead of relying on the runner's default. Use a managed identity on a supported Azure host or a federated service principal in a compatible pipeline rather than scripting a user sign-in. Grant permissions at the narrowest scope that supports the task. A role that can manage a storage account, for example, does not necessarily grant permission to read its blobs.
Choose an output format based on how the result will be used. Table output is convenient for terminal inspection, while JSON preserves nested properties for downstream processing. Use --query with a JMESPath expression to select a single property, such as a resource ID, and --output tsv to capture that value without JSON quoting. Test scripts in the shell that will run them because Bash and PowerShell handle quoting and variable expansion differently. Do not write access tokens, connection strings, or secret values to shared logs.
For repeatable infrastructure changes, keep the desired configuration in version-controlled Bicep files or Azure Resource Manager templates and use the CLI to submit deployments. At resource-group scope, run az deployment group what-if to review predicted changes before running az deployment group create. Use direct service commands for targeted tasks, such as checking a resource's provisioning state or updating a specific setting. If a command returns early because it was run with --no-wait, use the corresponding wait command where available or check the operation's status before starting dependent work.
Some command groups are distributed as extensions. Install the required extensions explicitly on build runners, record their versions alongside the base CLI version, and test upgrades before rolling them out. Review release notes for changes to command defaults, and set explicit values when a default would change the infrastructure a script creates.