Skip to content

az login No subscriptions found for #33126

@eliassal

Description

@eliassal

Describe the bug

all of a sudden on a win 10 desktop, I try to login to azure using (I get a dialog box with my email, then password)

az login
I get

No subscriptions found for myemail

Whereas I do the same thing from laptop It goes through and get connected

I also used

Dockerfile
az login --use-device-code

I get

Found multiple accounts with the same username 'myemail.........': [{'home_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad', 'environment': 'login.microsoftonline.com', 'username': 'myemail', 'account_source': 'broker', 'authority_type': 'MSSTS', 'local_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad.f8cdef31-a31e-4b4a-93e4-5f571e91255a', 'realm': 'organizations'}, {'home_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20.6799c70e-3ceb-4e88-af13-8f6c565fd4a5', 'environment': 'login.microsoftonline.com', 'username': 'myemail', 'account_source': 'urn:ietf:params:oauth:grant-type:device_code', 'authority_type': 'MSSTS', 'local_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20', 'realm': 'organizations'}]
Please report to us via Github: #20168

but it did not help

Thanks form your help

Related command

az login
az login --use-device-code

Errors

Mentioned above

Issue script & Debug output

cli.knack.cli: Command arguments: ['login', '--use-device-code', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x00000238426884A0>, <function OutputProducer.on_global_arguments at 0x0000023842C1D800>, <function CLIQuery.on_global_arguments at 0x0000023842C6F740>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'login': ['azure.cli.command_modules.profile']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: profile 0.005 2 8
cli.azure.cli.core: Total (1) 0.005 2 8
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: next 0.012 1 1 C:\Users\salam.SALAM.azure\cliextensions\next
cli.azure.cli.core: Total (1) 0.012 1 1
cli.azure.cli.core: Loaded 2 groups, 9 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : login
cli.azure.cli.core: Command table: login
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x0000023845385080>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\salam.SALAM.azure\commands\2026-04-02.12-04-30.login.12480.log'.
az_command_data_logger: command args: login --use-device-code --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x00000238453CA5C0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x00000238453EC900>, <function register_cache_arguments..add_cache_arguments at 0x00000238453ECAE0>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x00000238453ECB80>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x0000023842C1D8A0>, <function CLIQuery.handle_query_parameter at 0x0000023842C6F7E0>, <function register_ids_argument..parse_ids_arguments at 0x00000238453EC9A0>]
cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\salam.SALAM\.azure\msal_token_cache.bin', encrypt=True
cli.azure.cli.core.auth.binary_cache: load: C:\Users\salam.SALAM.azure\msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
msal.authority: openid_config("https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic', 'self_signed_tls_client_auth'], 'jwks_uri': 'https://login.microsoftonline.com/organizations/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/organizations/kerberos', 'mtls_endpoint_aliases': {'token_endpoint': 'https://mtlsauth.microsoft.com/organizations/oauth2/v2.0/token'}, 'tls_client_certificate_bound_access_tokens': True, 'tenant_region_scope': None, 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? True
urllib3.connectionpool: Starting new HTTPS connection (1): login.microsoftonline.com:443
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/devicecode HTTP/1.1" 200 1100
To sign in, use a web browser to open the page https://login.microsoft.com/device and enter the code CKM5SPXNT to authenticate.
msal.telemetry: Generate or reuse correlation_id: af8ec8be-e248-4949-ba85-d4f214b071bc
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 400 501
urllib3.connectionpool: https://login.microsoftonline.com:443 "POST /organizations/oauth2/v2.0/token HTTP/1.1" 200 5610
msal.token_cache: event={
"client_id": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
"data": {
"claims": "{"access_token": {"xms_cc": {"values": ["CP1"]}}}",
"client_id": "04b07795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8y1KQO4pIB5hf-kFurp2EElbAkveX9XN2f9nXeo440i2Jb0poSsd8Dy4CN1rpPTuZR3zwXppqDbKkEQyXfgsQfE5rGv1p9ZiJtT86wjoqpkomjCDZYR4enoffkmL5fVaDNMdw6LOreln-Q0_OLqhT4fVkkT8c--ag6BXit1yG6mTZHvg_JgfkKVyoI3bANMRE2luf1jdEPEXYf2p4QsLoq7RKhBw2AwqebFOyfRJr3qtTjAN6kn4HRsUf2cCUDd8pmodjV9S0tJGPZUWDOL7PRAYpVPvAhDVLt5xUdcA-uKax-amsePXkoHlVUUKa3T19SO41rVVoy4kVWobzU87_Wn6BPuU2_lAjcEYmOfQtIaNkMDiQVPNFVMgLN7N1-GiNlQwgAvCZXPmYM0jpO9mnJPMezr1K5C5gsNGOoWHzX6m5xXoTZyORmopMVTQTVAKawWSY0o6PZ8MN7qWLXL6evVKoVtqQyGb0bnmPXK_XBpZU1VPpkGRdLgf8OH-SVAJrcc-Zl3h1zlfSuaR0820OJQFFXupOAJlJAVae74PIMWBVN4TpVIKZP4Xej0yIIJVOgPDjpgy67APJFAAKnmRxAfldoLMMP4K6bAuta8k6pmCY5_UTPdUUIAA"
},
"environment": "login.microsoftonline.com",
"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
"params": null,
"response": {
"access_token": "",
"client_info": "eyJ1aWQiOiI4ZWYwYzBlYi04NjBiLTQ3YTQtOGFlOC04ZGNiNzQ2M2RkMjAiLCJ1dGlkIjoiNjc5OWM3MGUtM2NlYi00ZTg4LWFmMTMtOGY2YzU2NWZkNGE1In0",
"expires_in": 4691,
"ext_expires_in": 4691,
"id_token": "
",
"refresh_token": "********",
"scope": "https://management.core.windows.net//user_impersonation https://management.core.windows.net//.default",
"token_type": "Bearer"
},
"scope": [
"https://management.core.windows.net//user_impersonation",
"https://management.core.windows.net//.default"
],
"token_endpoint": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token"
}

Retrieving tenants and subscriptions for the selection...
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/organizations
msal.authority: openid_config("https://login.microsoftonline.com/organizations/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic', 'self_signed_tls_client_auth'], 'jwks_uri': 'https://login.microsoftonline.com/organizations/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/{tenantid}/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/organizations/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/organizations/kerberos', 'mtls_endpoint_aliases': {'token_endpoint': 'https://mtlsauth.microsoft.com/organizations/oauth2/v2.0/token'}, 'tls_client_certificate_bound_access_tokens': True, 'tenant_region_scope': None, 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? True
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 734, in _run_jobs_serially
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 703, in _run_job
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 336, in call
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 192, in login
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 197, in login
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 240, in get_user_credential
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/msal_credentials.py", line 38, in init
knack.util.CLIError: Found multiple accounts with the same username 'myemail@sierac.fr': [{'home_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'broker', 'authority_type': 'MSSTS', 'local_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad.f8cdef31-a31e-4b4a-93e4-5f571e91255a', 'realm': 'organizations'}, {'home_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20.6799c70e-3ceb-4e88-af13-8f6c565fd4a5', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'urn:ietf:params:oauth:grant-type:device_code', 'authority_type': 'MSSTS', 'local_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20', 'realm': 'organizations'}]
Please report to us via Github: #20168

cli.azure.cli.core.azclierror: Found multiple accounts with the same username 'myemail@sierac.fr': [{'home_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'broker', 'authority_type': 'MSSTS', 'local_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad.f8cdef31-a31e-4b4a-93e4-5f571e91255a', 'realm': 'organizations'}, {'home_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20.6799c70e-3ceb-4e88-af13-8f6c565fd4a5', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'urn:ietf:params:oauth:grant-type:device_code', 'authority_type': 'MSSTS', 'local_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20', 'realm': 'organizations'}]
Please report to us via Github: #20168
az_command_data_logger: Found multiple accounts with the same username 'myemail@sierac.fr': [{'home_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'broker', 'authority_type': 'MSSTS', 'local_account_id': '00000000-0000-0000-79a4-f97ea3a4f412.9188040d-6c67-4c5b-b112-36a304b66dad.f8cdef31-a31e-4b4a-93e4-5f571e91255a', 'realm': 'organizations'}, {'home_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20.6799c70e-3ceb-4e88-af13-8f6c565fd4a5', 'environment': 'login.microsoftonline.com', 'username': 'myemail@sierac.fr', 'account_source': 'urn:ietf:params:oauth:grant-type:device_code', 'authority_type': 'MSSTS', 'local_account_id': '8ef0c0eb-860b-47a4-8ae8-8dcb7463dd20', 'realm': 'organizations'}]
Please report to us via Github: #20168
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x0000023845385300>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 67.841 seconds (init: 0.375, invoke: 67.466)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 4509 in cache file under C:\Users\salam.SALAM.azure\telemetry\20260402120538258
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry_init_.pyc C:\Users\salam.SALAM.azure C:\Users\salam.SALAM.azure\telemetry\20260402120538258"
telemetry.process: Return from creating process 28708
telemetry.main: Finish creating telemetry upload process.
salam C:\Projects\WindowsScripts\PS\Scripts 12:05:38 

Expected behavior

et connected using az cli to my subscription

Environment Summary

azure-cli 2.79.0 *

core 2.79.0 *
telemetry 1.1.0

Extensions:
account 0.2.5
automation 1.0.0b1
azure-devops 1.0.2
bastion 1.4.2
containerapp 1.2.0b4
interactive 1.0.0b1
next 0.1.3
resource-graph 2.1.1
spring-cloud 3.1.8
storage-preview 1.0.0b7

Dependencies:
msal 1.34.0b1
azure-mgmt-resource 23.3.0

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 teamLoginPossible-SolutionSimilar-Issueact-identity-squadbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions