az config set: Configure CLI Defaults
az config set writes persistent Azure CLI configuration such as default output format and resource group.
Setting CLI defaults once at the start of a job trims repetitive flags and makes output predictable for parsing. It is the cleanest way to standardize behavior.
What it does
az config set writes configuration values that persist for the session or user, grouped by section. Common keys set the default output format, a default resource group and location, telemetry, and unattended extension installs.
Common usage
# predictable machine-readable output
az config set core.output=json
# stop interactive extension prompts
az config set extension.use_dynamic_install=yes_without_prompt
# default group and location to skip repeating flags
az config set defaults.group=rg-app defaults.location=eastusSubcommands and flags
| Key | What it does |
|---|---|
| core.output | Default output format (json, tsv, table) |
| core.only_show_errors | Suppress warnings in output |
| defaults.group | Default resource group for commands |
| defaults.location | Default region |
| extension.use_dynamic_install | Auto-install extensions unattended |
| core.collect_telemetry | Enable or disable telemetry |
In CI
At the start of a job, set core.output=json (or tsv) so parsing is stable regardless of the runner default, set only_show_errors to keep logs clean, and set extension.use_dynamic_install so no prompt ever blocks. Setting defaults.group removes a repeated -g from every command.
Common errors in CI
"Configuration key '<x>' not found" means a misspelled key or wrong section prefix; keys are section.name. A default group set via defaults.group can silently target the wrong group if a command omits -g, so be deliberate. Telemetry warnings vanish once core.collect_telemetry is set explicitly.