% az login --service-principal -u $spnid -p $spnsecret --tenant $tenantid
The command failed with an unexpected error. Here is the traceback:
allow_broker=True is only supported in PublicClientApplication
Traceback (most recent call last):
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
raise ex
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
result = cmd_copy(params)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
return self.handler(*args, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login
subscriptions = profile.login(
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 159, in login
identity.login_with_service_principal(username, password, scopes=scopes)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/auth/identity.py", line 182, in login_with_service_principal
cred = ServicePrincipalCredential(sp_auth, **self._msal_app_kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/azure/cli/core/auth/msal_authentication.py", line 132, in __init__
super().__init__(service_principal_auth.client_id, client_credential=client_credential, **kwargs)
File "/opt/homebrew/Cellar/azure-cli/2.47.0/libexec/lib/python3.10/site-packages/msal/application.py", line 555, in __init__
raise ValueError("allow_broker=True is only supported in PublicClientApplication")
ValueError: allow_broker=True is only supported in PublicClientApplication
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
To open a new issue, please run `az feedback````
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az login --service-principal -u $spnid -p $spnsecret --tenant $tenantid
## Expected Behavior
## Environment Summary
## Additional Context
<!--Please don't remove this:-->
<!--auto-generated-->
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az loginErrors:
macOS-13.2.1-arm64-arm-64bit, Darwin 22.3.0
Python 3.10.10
Installer: HOMEBREW
azure-cli 2.47.0
Extensions:
azure-devops 0.26.0
log-analytics-solution 0.1.1
ssh 1.1.5
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0