WindowsmacOSLinux

Where Does Azure CLI Store Config?

Azure CLI's .azure directory, config file, login profiles, and telemetry toggle.

Last updated

Azure CLI keeps everything per user in a .azure directory in home. The INI config file holds behavior defaults, while azureProfile.json carries subscriptions and clouds from logins.

AZURE_CONFIG_DIR relocates the whole tree when profiles must isolate. Day to day edits go through az config set rather than hand editing, which keeps formatting valid.

Where Azure CLI stores this, by platform

Windows
%USERPROFILE%\.azure\config

Config file. Profiles in azureProfile.json beside it. Cloud Shell and Docker images use their own homes, so local logins never leak across.

macOS
~/.azure/config

Same layout under home. Disable telemetry with az config set core.collect_telemetry=no if the survey links annoy you.

Linux
~/.azure/config

Same layout. Install itself lives in /opt/az on Debian siblings, but user state always stays in home.

Frequently asked questions

Where are Azure CLI logins stored?

In azureProfile.json inside .azure. Deleting it signs every subscription out at once, which is the fastest clean slate.

How do I isolate Azure CLI profiles?

Set AZURE_CONFIG_DIR to another folder per shell. Each directory then keeps its own config, logins and clouds.

Notice an outdated path? Let us know.