question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

az login (got an unexpected keyword argument 'allow_broker')

See original GitHub issue

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az ad signed-in-user show

Errors:

The command failed with an unexpected error. Here is the traceback:
ClientApplication.__init__() got an unexpected keyword argument 'allow_broker'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 718, in _run_job
    return cmd_copy.exception_handler(ex)
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/commands.py", line 51, in graph_err_handler
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py", line 363, in handler
    show_exception_handler(ex)
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/arm.py", line 429, in show_exception_handler
    raise ex
  File "/usr/lib/python3/dist-packages/azure/cli/core/commands/command_operation.py", line 361, in handler
    return op(**command_args)
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/custom.py", line 1803, in show_signed_in_user
    result = client.signed_in_user_get()
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/_msgrpah/_graph_client.py", line 224, in signed_in_user_get
    result = self._send("GET", "/me")
  File "/usr/lib/python3/dist-packages/azure/cli/command_modules/role/_msgrpah/_graph_client.py", line 52, in _send
    r = send_raw_request(self._cli_ctx, method, url, resource=self._resource, uri_parameters=param,
  File "/usr/lib/python3/dist-packages/azure/cli/core/util.py", line 990, in send_raw_request
    token_info, _, _ = profile.get_raw_token(resource)
  File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py", line 382, in get_raw_token
    credential = self._create_credential(account, tenant)
  File "/usr/lib/python3/dist-packages/azure/cli/core/_profile.py", line 592, in _create_credential
    return identity.get_user_credential(username_or_sp_id)
  File "/usr/lib/python3/dist-packages/azure/cli/core/auth/identity.py", line 224, in get_user_credential
    return UserCredential(self.client_id, username, **self._msal_app_kwargs)
  File "/usr/lib/python3/dist-packages/azure/cli/core/auth/msal_authentication.py", line 39, in __init__
    super().__init__(client_id, **kwargs)
  File "/usr/lib/python3/dist-packages/msal/application.py", line 1525, in __init__
    super(PublicClientApplication, self).__init__(
TypeError: ClientApplication.__init__() got an unexpected keyword argument 'allow_broker'

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here…
  • az ad signed-in-user show -o={}

Expected Behavior

Environment Summary

Linux-5.18.0-kali7-amd64-x86_64-with-glibc2.35, Kali GNU/Linux Rolling
Python 3.10.7
Installer: DEB

azure-cli 2.41.0

Extensions:
azure-devops 0.24.0

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.0.0

Additional Context

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dr-1commented, Oct 31, 2022

For me the issue went away when upgrading the msal package from version 1.18.0b1 to version 1.20.0. pip install --upgrade msal

1reaction
sean-keane25commented, Oct 26, 2022

I am experiencing the same issue, but with this command:

az login

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am currently using the latest version of Ubuntu to do this ...
az provider register --namespace Microsoft. ... __init__() got an unexpected keyword argument 'allow_broker' Traceback (most recent call ...
Read more >
"az login" command gives "msi" error while login - Microsoft
(1)Deploy the DSVM ( Ubuntu) and try to run "az login" command , it results in below ... login() got an unexpected keyword...
Read more >
az ml commands are failing with "ERROR: {'Azure-cli-ml Version'
The error is: “ERROR: {'Azure-cli-ml Version': '1.5.0', 'Error': TypeError(“init() got an unexpected keyword argument 'async_persist'”)}”. Any idea on how to ...
Read more >
Getting Started with Azure CLI - Parveen Singh
Run the following command in your terminal: az login -u <username> -p <password>. Replace the username and password with your Azure ...
Read more >
'Azure-cli-ml Version': '1.33.0', 'Error' - Github Lab
... 'Error': TypeError("__init__() got an unexpected keyword argument ... /usr/bin/az cloud set -n AzureCloud /usr/bin/az login --service-principal -u ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found