Skip to content
Latchkey

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

Terminal
# 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=eastus

Subcommands and flags

KeyWhat it does
core.outputDefault output format (json, tsv, table)
core.only_show_errorsSuppress warnings in output
defaults.groupDefault resource group for commands
defaults.locationDefault region
extension.use_dynamic_installAuto-install extensions unattended
core.collect_telemetryEnable 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.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →