-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamLogincustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Describe the bug
I'm unable to login in Azure CLI in a headless server with az login --use-device-code.
Related command
az login --use-device-code
Errors
$ az login --use-device-code
The command failed with an unexpected error. Here is the traceback:
Session.request() got an unexpected keyword argument 'claims_challenge'
Traceback (most recent call last):
File "/nix/store/960pvxisg06lbzlq8a6hlv3gix3gkaq1-python3.13-knack-0.13.0/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/lib/python3.13/site-packages/azure/cli/command_modules/profile/custom.py", line 192, in login
subscriptions = profile.login(
interactive,
...<9 lines>...
claims_challenge=claims_challenge
)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/_profile.py", line 175, in login
user_identity = identity.login_with_device_code(scopes=scopes, claims_challenge=claims_challenge)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/auth/identity.py", line 175, in login_with_device_code
flow = self._msal_app.initiate_device_flow(scopes, claims_challenge=claims_challenge)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/application.py", line 2341, in initiate_device_flow
flow = self.client.initiate_device_flow(
scope=self._decorate_scope(scopes or []),
headers={msal.telemetry.CLIENT_REQUEST_ID: correlation_id},
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/oauth2cli/oauth2.py", line 326, in initiate_device_flow
resp = self._http_client.post(self.configuration[DAE],
data={"client_id": self.client_id, "scope": self._stringify(scope or [])},
headers=dict(self.default_headers, **kwargs.pop("headers", {})),
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/throttled_http_client.py", line 96, in post
return NormalizedResponse(self.http_client.post(*args, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/7y4kwfy5la7zpv8m36r1klcgv4rm0h0v-python3.13-requests-2.32.5/lib/python3.13/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.request() got an unexpected keyword argument 'claims_challenge'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issuesIssue script & Debug output
$ az login --use-device-code --debug
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 0x7f303eeeaca0>, <function OutputProducer.on_global_arguments at 0x7f303ecd80e0>, <function CLIQuery.on_global_arguments at 0x7f303ecf6520>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core: Command index has been invalidated.
cli.azure.cli.core: No module found from index for '['login', '--use-device-code', '--debug']'
cli.azure.cli.core: Loading all modules and extensions
cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'compute_recommender', 'computefleet', 'config', 'configure', 'consumption', 'container', 'containerapp', 'cosmosdb', 'databoxedge', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: acr 0.241 36 149
cli.azure.cli.core: acs 0.176 18 96
cli.azure.cli.core: advisor 0.002 3 6
cli.azure.cli.core: ams 0.008 22 100
cli.azure.cli.core: apim 0.007 14 69
cli.azure.cli.core: appconfig 0.004 9 47
cli.azure.cli.core: appservice 0.042 88 299
cli.azure.cli.core: aro 0.013 1 10
cli.azure.cli.core: backup 0.006 17 65
cli.azure.cli.core: batch 0.079 32 96
cli.azure.cli.core: batchai 0.004 10 30
cli.azure.cli.core: billing 0.019 20 53
cli.azure.cli.core: botservice 0.005 12 42
cli.azure.cli.core: cdn 0.269 9 51
cli.azure.cli.core: cloud 0.002 1 7
cli.azure.cli.core: cognitiveservices 0.005 14 56
cli.azure.cli.core: compute_recommender 0.005 1 1
cli.azure.cli.core: computefleet 0.012 1 1
cli.azure.cli.core: config 0.002 2 7
cli.azure.cli.core: configure 0.001 2 5
cli.azure.cli.core: consumption 0.021 8 9
cli.azure.cli.core: container 0.019 2 17
cli.azure.cli.core: containerapp 0.139 39 132
cli.azure.cli.core: cosmosdb 0.021 58 200
cli.azure.cli.core: databoxedge 0.009 2 2
cli.azure.cli.core: dls 0.005 6 36
cli.azure.cli.core: dms 0.001 3 22
cli.azure.cli.core: eventgrid 0.003 25 96
cli.azure.cli.core: eventhubs 0.007 13 21
cli.azure.cli.core: extension 0.001 1 7
cli.azure.cli.core: feedback 0.000 1 2
cli.azure.cli.core: find 0.001 1 1
cli.azure.cli.core: hdinsight 0.004 10 45
cli.azure.cli.core: identity 0.004 2 7
cli.azure.cli.core: interactive 0.000 1 1
cli.azure.cli.core: iot 0.054 18 81
cli.azure.cli.core: keyvault 0.008 20 114
cli.azure.cli.core: lab 0.017 9 30
cli.azure.cli.core: managedservices 0.005 3 8
cli.azure.cli.core: maps 0.001 5 13
cli.azure.cli.core: marketplaceordering 0.001 1 2
cli.azure.cli.core: monitor 0.359 17 64
cli.azure.cli.core: mysql 0.058 16 56
cli.azure.cli.core: netappfiles 0.027 8 15
cli.azure.cli.core: network 0.088 106 351
cli.azure.cli.core: policyinsights 0.012 9 17
cli.azure.cli.core: privatedns 0.011 14 60
cli.azure.cli.core: profile 0.001 2 8
cli.azure.cli.core: rdbms 0.056 41 170
cli.azure.cli.core: redis 0.002 7 38
cli.azure.cli.core: relay 0.013 7 8
cli.azure.cli.core: resource 0.024 52 234
cli.azure.cli.core: role 0.002 17 62
cli.azure.cli.core: search 0.006 8 20
cli.azure.cli.core: security 0.007 48 98
cli.azure.cli.core: servicebus 0.005 13 17
cli.azure.cli.core: serviceconnector 0.024 20 331
cli.azure.cli.core: servicefabric 0.009 27 80
cli.azure.cli.core: signalr 0.002 10 42
cli.azure.cli.core: sql 0.009 56 219
cli.azure.cli.core: sqlvm 0.020 4 20
cli.azure.cli.core: storage 0.035 61 277
cli.azure.cli.core: synapse 0.008 54 246
cli.azure.cli.core: util 0.001 3 7
cli.azure.cli.core: vm 0.080 60 206
cli.azure.cli.core: Total (65) 2.080 1200 4682
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ssh 0.011 1 4 /nix/store/c8ia03ar8gb5wgfccc2zah0k585k5bpy-azure-cli-extensions/ssh
cli.azure.cli.core: Total (1) 0.011 1 4
cli.azure.cli.core: Loaded 1187 groups, 4686 commands.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core._session: Skipping update of file /nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/etc/azure/commandIndex.json due to immutable directory.
cli.azure.cli.core: Updated command index in 0.003 seconds.
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f303d640f40>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/h/.azure/commands/2026-02-27.13-06-30.login.210770.log'.
az_command_data_logger: command args: login --use-device-code --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x7f303d683060>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x7f303d69d3a0>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x7f303d69d580>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x7f303d69d620>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f303b505260>]
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f303ecd8180>, <function CLIQuery.handle_query_parameter at 0x7f303ecf65c0>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x7f303d69d440>]
cli.azure.cli.core.auth.persistence: build_persistence: location='/home/h/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /home/h/.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? None
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/nix/store/960pvxisg06lbzlq8a6hlv3gix3gkaq1-python3.13-knack-0.13.0/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/lib/python3.13/site-packages/azure/cli/command_modules/profile/custom.py", line 192, in login
subscriptions = profile.login(
interactive,
...<9 lines>...
claims_challenge=claims_challenge
)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/_profile.py", line 175, in login
user_identity = identity.login_with_device_code(scopes=scopes, claims_challenge=claims_challenge)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/auth/identity.py", line 175, in login_with_device_code
flow = self._msal_app.initiate_device_flow(scopes, claims_challenge=claims_challenge)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/application.py", line 2341, in initiate_device_flow
flow = self.client.initiate_device_flow(
scope=self._decorate_scope(scopes or []),
headers={msal.telemetry.CLIENT_REQUEST_ID: correlation_id},
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/oauth2cli/oauth2.py", line 326, in initiate_device_flow
resp = self._http_client.post(self.configuration[DAE],
data={"client_id": self.client_id, "scope": self._stringify(scope or [])},
headers=dict(self.default_headers, **kwargs.pop("headers", {})),
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/throttled_http_client.py", line 96, in post
return NormalizedResponse(self.http_client.post(*args, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/7y4kwfy5la7zpv8m36r1klcgv4rm0h0v-python3.13-requests-2.32.5/lib/python3.13/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.request() got an unexpected keyword argument 'claims_challenge'
cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: Session.request() got an unexpected keyword argument 'claims_challenge'
Traceback (most recent call last):
File "/nix/store/960pvxisg06lbzlq8a6hlv3gix3gkaq1-python3.13-knack-0.13.0/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/lib/python3.13/site-packages/azure/cli/command_modules/profile/custom.py", line 192, in login
subscriptions = profile.login(
interactive,
...<9 lines>...
claims_challenge=claims_challenge
)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/_profile.py", line 175, in login
user_identity = identity.login_with_device_code(scopes=scopes, claims_challenge=claims_challenge)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/auth/identity.py", line 175, in login_with_device_code
flow = self._msal_app.initiate_device_flow(scopes, claims_challenge=claims_challenge)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/application.py", line 2341, in initiate_device_flow
flow = self.client.initiate_device_flow(
scope=self._decorate_scope(scopes or []),
headers={msal.telemetry.CLIENT_REQUEST_ID: correlation_id},
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/oauth2cli/oauth2.py", line 326, in initiate_device_flow
resp = self._http_client.post(self.configuration[DAE],
data={"client_id": self.client_id, "scope": self._stringify(scope or [])},
headers=dict(self.default_headers, **kwargs.pop("headers", {})),
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/throttled_http_client.py", line 96, in post
return NormalizedResponse(self.http_client.post(*args, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/7y4kwfy5la7zpv8m36r1klcgv4rm0h0v-python3.13-requests-2.32.5/lib/python3.13/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.request() got an unexpected keyword argument 'claims_challenge'
az_command_data_logger: Session.request() got an unexpected keyword argument 'claims_challenge'
Traceback (most recent call last):
File "/nix/store/960pvxisg06lbzlq8a6hlv3gix3gkaq1-python3.13-knack-0.13.0/lib/python3.13/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 666, in execute
raise ex
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 703, in _run_job
result = cmd_copy(params)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/__init__.py", line 336, in __call__
return self.handler(*args, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/commands/command_operation.py", line 120, in handler
return op(**command_args)
File "/nix/store/65z5aqlpaw0b6h32p9148p8li9dddzwk-python3.13-azure-cli-2.81.0/lib/python3.13/site-packages/azure/cli/command_modules/profile/custom.py", line 192, in login
subscriptions = profile.login(
interactive,
...<9 lines>...
claims_challenge=claims_challenge
)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/_profile.py", line 175, in login
user_identity = identity.login_with_device_code(scopes=scopes, claims_challenge=claims_challenge)
File "/nix/store/2ja0f0d791jfp5vikry7gm8dxqypb1qv-python3.13-azure-cli-core-2.81.0/lib/python3.13/site-packages/azure/cli/core/auth/identity.py", line 175, in login_with_device_code
flow = self._msal_app.initiate_device_flow(scopes, claims_challenge=claims_challenge)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/application.py", line 2341, in initiate_device_flow
flow = self.client.initiate_device_flow(
scope=self._decorate_scope(scopes or []),
headers={msal.telemetry.CLIENT_REQUEST_ID: correlation_id},
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/oauth2cli/oauth2.py", line 326, in initiate_device_flow
resp = self._http_client.post(self.configuration[DAE],
data={"client_id": self.client_id, "scope": self._stringify(scope or [])},
headers=dict(self.default_headers, **kwargs.pop("headers", {})),
**kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/individual_cache.py", line 273, in wrapper
value = function(*args, **kwargs)
File "/nix/store/kk2cpblqk8hlallv0y8bfw4fb7ii78af-python3.13-msal-1.33.0/lib/python3.13/site-packages/msal/throttled_http_client.py", line 96, in post
return NormalizedResponse(self.http_client.post(*args, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/nix/store/7y4kwfy5la7zpv8m36r1klcgv4rm0h0v-python3.13-requests-2.32.5/lib/python3.13/site-packages/requests/sessions.py", line 637, in post
return self.request("POST", url, data=data, json=json, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.request() got an unexpected keyword argument 'claims_challenge'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f303d6411c0>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 2.790 seconds (init: 0.649, invoke: 2.141)
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 7657 in cache file under /home/h/.azure/telemetry/20260227130630248
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/nix/store/slhpx9glq7vl99bwi93bgrhn3syv98s1-python3-3.13.11/bin/python3.13 /nix/store/pl15lnvdwsj93wdb5bdvpq95g8ds0xq8-python3.13-azure-cli-telemetry-1.1.0/lib/python3.13/site-packages/azure/cli/telemetry/__init__.py /home/h/.azure /home/h/.azure/telemetry/20260227130630248"
telemetry.process: Return from creating process 210822
telemetry.main: Finish creating telemetry upload process.Expected behavior
I'd expect no error, but a message with an URL to copy and paste on my browser to login.
Environment Summary
azure-cli 2.81.0 *
core 2.81.0 *
telemetry 1.1.0
Extensions:
ssh 2.0.6
Dependencies:
msal 1.33.0
azure-mgmt-resource 24.0.0
Python location '/nix/store/slhpx9glq7vl99bwi93bgrhn3syv98s1-python3-3.13.11/bin/python3.13'
Config directory '/home/h/.azure'
Extensions directory '/nix/store/c8ia03ar8gb5wgfccc2zah0k585k5bpy-azure-cli-extensions'
Python (Linux) 3.13.11 (main, Dec 5 2025, 16:06:33) [GCC 15.2.0]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Labels
Accountaz login/accountaz login/accountAuto-AssignAuto assign by botAuto assign by botAuto-ResolveAuto resolve by botAuto resolve by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamLogincustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues 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 thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that