Azure / Azure/azure-cli

Feature request: Silent Login for Automation Scenarios

Open
#32,389 4 comments 0 reactions 1 assignee Claimed by @jiasli View on GitHub
Account act-identity-squad Auto-Assign Azure CLI Team feature-request Possible-Solution Similar-Issue
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Related command**

**Is your feature request related to a problem? Please describe.**

When running automation scripts on a development machine, the az login command always triggers an account picker prompt, requiring manual account selection.

Image

In most cases, there is only one account configured on the device, making this prompt unnecessary and interrupting automation workflows.

We would like to have a silent login option that automatically signs in when only one account is available, and only shows the account picker when necessary (e.g., multiple accounts or login issues).

Possible approaches:

**Describe the solution you'd like**

az login default-account # silent login using the default account
az login select-account # explicitly show the account picker

Goal:
Allow az login to work non-interactively for automation and CI/CD scenarios, improving efficiency and usability.

**Describe alternatives you've considered**

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.