Skip to content

az login --allow-no-subscriptions is ignored and attempts to enumerate all subscriptions, causing failures for tenants having too many subscriptionsΒ #31939

@zack4485-skillable

Description

@zack4485-skillable

Describe the bug

az login --allow-no-subscriptions is ignored and attempts to enumerate all subscriptions, causing failures for tenants having too many subscriptions.

We have tenants with more than 1M subscriptions and so the az login routine just outright fails. We have other tenants having many thousands of subscriptions for which az login does eventually succeed but not before waiting several minutes.

Related command

az login --allow-no-subscriptions

Errors

N/A. It simply barfs or takes forever. It's clear the login routine simply isn't honoring the flag to skip the subscription enumeration.

Issue script & Debug output

This behavior is the problem...

https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively?view=azure-cli-latest

Interactive logins insist on loading the subscription selector and there's no way to turn it off because az config set core.login_experience_v2=off does not work (see related issue).

Expected behavior

A user using interactive login by running the command az login --allow-no-subscriptions should not be routed through the subscription selector.

Environment Summary

azure-cli 2.73.0 *

core 2.73.0 *
telemetry 1.1.0

Dependencies:
msal 1.32.3
azure-mgmt-resource 23.3.0

Python location '/opt/homebrew/Cellar/azure-cli/2.73.0/libexec/bin/python'
Config directory '/Users/foo/.azure'
Extensions directory '/Users/foo/.azure/cliextensions'

Python (Darwin) 3.12.10 (main, Apr 8 2025, 11:35:47) [Clang 17.0.0 (clang-1700.0.13.3)]

Legal docs and information: aka.ms/AzureCliLegal

Additional context

No response

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botAuto-ResolveAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamConfigureaz configure/configcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions