Skip to content

az login: request() got an unexpected keyword argument 'enable_cae' #27131

@mm-supernice

Description

@mm-supernice

Describe the bug

when running "az login" after authentication in the browser (safari or edge) a stack trace is shown:

Related command

az login

Errors

The command failed with an unexpected error. Here is the traceback: request() got an unexpected keyword argument 'enable_cae' Traceback (most recent call last): File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute raise ex File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job result = cmd_copy(params) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__ return self.handler(*args, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler return op(**command_args) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login subscriptions = profile.login( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/_profile.py", line 176, in login subscriptions = subscription_finder.find_using_common_tenant(username, credential) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/_profile.py", line 759, in find_using_common_tenant subscriptions = self.find_using_specific_tenant(tenant_id, specific_tenant_credential) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/_profile.py", line 809, in find_using_specific_tenant for s in subscriptions: File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/paging.py", line 123, in __next__ return next(self._page_iterator) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/paging.py", line 75, in __next__ self._response = self._get_next(self.continuation_token) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py", line 519, in get_next pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/_base.py", line 227, in run return first_node.send(pipeline_request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/_base.py", line 89, in send response = self.next.send(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/_base.py", line 89, in send response = self.next.send(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/_base.py", line 89, in send response = self.next.send(request) [Previous line repeated 2 more times] File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/mgmt/core/policies/_base.py", line 46, in send response = self.next.send(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/policies/_redirect.py", line 184, in send response = self.next.send(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/policies/_retry.py", line 473, in send response = self.next.send(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/policies/_authentication.py", line 120, in send self.on_request(request) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/core/pipeline/policies/_authentication.py", line 96, in on_request self._token = self._credential.get_token(*self._scopes, enable_cae=self._enable_cae) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/azure/cli/core/auth/msal_authentication.py", line 69, in get_token result = self.acquire_token_silent_with_error(list(scopes), self._account, claims_challenge=claims, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/application.py", line 1279, in acquire_token_silent_with_error return _clean_up(self._acquire_token_silent_with_error( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/application.py", line 1301, in _acquire_token_silent_with_error result = self._acquire_token_silent_from_cache_and_possibly_refresh_it( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/application.py", line 1415, in _acquire_token_silent_from_cache_and_possibly_refresh_it result = self._acquire_token_silent_by_finding_rt_belongs_to_me_or_my_family( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/application.py", line 1471, in _acquire_token_silent_by_finding_rt_belongs_to_me_or_my_family last_resp = at = self._acquire_token_silent_by_finding_specific_refresh_token( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/application.py", line 1521, in _acquire_token_silent_by_finding_specific_refresh_token response = client.obtain_token_by_refresh_token( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/oauth2cli/oauth2.py", line 830, in obtain_token_by_refresh_token resp = super(Client, self).obtain_token_by_refresh_token( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/oauth2cli/oauth2.py", line 262, in obtain_token_by_refresh_token return self._obtain_token("refresh_token", data=data, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/oauth2cli/oidc.py", line 116, in _obtain_token ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/oauth2cli/oauth2.py", line 771, in _obtain_token resp = super(Client, self)._obtain_token( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/oauth2cli/oauth2.py", line 234, in _obtain_token resp = (post or self._http_client.post)( File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/individual_cache.py", line 269, in wrapper value = function(*args, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/msal/individual_cache.py", line 269, in wrapper value = function(*args, **kwargs) File "/Users/bill.gates/Library/Python/3.9/lib/python/site-packages/requests/sessions.py", line 637, in post return self.request("POST", url, data=data, json=json, **kwargs) TypeError: request() got an unexpected keyword argument 'enable_cae'

Issue script & Debug output

confidential

Expected behavior

login should work like on my linux machine

Environment Summary

macOS 12.6.8
zsh 5.8.1
Python 3.9.6

azure-cli 2.51.0

core 2.51.0
telemetry 1.1.0

Extensions:
front-door 1.0.17

Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2

Python location '/Library/Developer/CommandLineTools/usr/bin/python3'
Extensions directory '/Users/silicium/.azure/cliextensions'

Python (Darwin) 3.9.6 (default, Oct 18 2022, 12:41:40)
[Clang 14.0.0 (clang-1400.0.29.202)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Assignees

Labels

Accountaz login/accountAuto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamcustomer-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