Open moraorviz opened 2 months ago
Thank you for opening this issue, we will look into it.
I just ran into the same issue, downgrading from "azure-cli": "2.61.0" to "azure-cli": "2.60.0", worked as a temporary fix for me.
I am involving pymsalruntime
team to look at this issue.
downgrading from "azure-cli": "2.61.0" to "azure-cli": "2.60.0", worked as a temporary fix for me
You don't really need to downgrade Azure CLI to a previous version. Instead, you may follow hhttps://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows to disable WAM authentication with:
az account clear
az config set core.enable_broker_on_windows=false
az login
I am involving
pymsalruntime
team to look at this issue.downgrading from "azure-cli": "2.61.0" to "azure-cli": "2.60.0", worked as a temporary fix for me
You don't really need to downgrade Azure CLI to a previous version. Instead, you may follow hhttps://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows to disable WAM authentication with:
az account clear az config set core.enable_broker_on_windows=false az login
Great, That worked for me. Thanks a lot
I am involving
pymsalruntime
team to look at this issue.downgrading from "azure-cli": "2.61.0" to "azure-cli": "2.60.0", worked as a temporary fix for me
You don't really need to downgrade Azure CLI to a previous version. Instead, you may follow hhttps://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli-interactively#sign-in-with-web-account-manager-wam-on-windows to disable WAM authentication with:
az account clear az config set core.enable_broker_on_windows=false az login
nice.. works for me too.
Describe the bug
I am getting unexpected error when executing az login
Related command
az login
Errors
Please select the account you want to log in with. The command failed with an unexpected error. Here is the traceback: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected 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 664, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, 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 701, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 158, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 172, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 160, in login_with_auth_code File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1966, in acquire_token_interactive File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 2084, in _acquire_token_interactive_via_broker File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/broker.py", line 202, in _signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 261, in pymsalruntime.pymsalruntime.signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 981, in pymsalruntime.pymsalruntime._check_error RuntimeError: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
Issue script & Debug output
cli.knack.cli: Command arguments: ['login', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. Enable VT mode. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x00000215AC8EB880>, <function OutputProducer.on_global_arguments at 0x00000215ACA760C0
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: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected 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 664, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, 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 701, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 158, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 172, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 160, in login_with_auth_code File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1966, in acquire_token_interactive File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 2084, in _acquire_token_interactive_via_broker File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/broker.py", line 202, in _signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 261, in pymsalruntime.pymsalruntime.signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 981, in pymsalruntime.pymsalruntime._check_error RuntimeError: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected az_command_data_logger: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected 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 664, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, 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 701, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 334, in call File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/command_modules/profile/custom.py", line 158, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/_profile.py", line 172, in login File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/auth/identity.py", line 160, in login_with_auth_code File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 1966, in acquire_token_interactive File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/application.py", line 2084, in _acquire_token_interactive_via_broker File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\msal/broker.py", line 202, in _signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 261, in pymsalruntime.pymsalruntime.signin_interactively File "pymsalruntime\PyMsalRuntime.pyx", line 981, in pymsalruntime.pymsalruntime._check_error RuntimeError: ErrorTag: 540656077, ErrorCode: 0, ErrorContext: Caught exception, ErrorStatus: Response_Status.Status_Unexpected 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 0x00000215AF95E5C0>] az_command_data_logger: exit code: 1 cli.main: Command ran in 1.089 seconds (init: 0.561, invoke: 0.528) 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 7540 in cache 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\AOXXXXXX.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.
Expected behavior
authenticate my user to azure
Environment Summary
{ "azure-cli": "2.61.0", "azure-cli-core": "2.61.0", "azure-cli-telemetry": "1.1.0", "extensions": { "azure-devops": "1.0.0" }
Additional context
i am using windows server 2016 and python11. this worked fine in previous versions