Describe the bug
When tried to az login, new browser window opened. When tried to change account, redirected to localhost URL.
To Reproduce
az loginpassword prompt page to go back to the list of accountsExpected behavior
az loginEnvironment summary
Additional context
Screenshots of steps:




4- EXPECTED

Thanks for reporting this. Before I fix this, you can ctrl+c to stop the cli command, and then rerun it.
Thanks Yugang :)
I am not able to reproduce this. Can you please try again? By default, account tile selection should not cause any errors, and should not post back to the CLI. This is a server end error trigger'd by browser page reload.
Please reactivate when you have repro
How can this be closed?
Azure cli is using code authorization when I try "login" and it is redirect to https://localhost:8400... This is a bug in the cli itself.
I am seeing the same issue. Using a Chromebook, so probably related to the fact that I am running the command from a docker on the machine.
@mdangear, when running inside docker, CLI will default to device code unless the image has UI browser, which is rare. But if you see the original issue, let me know and i will reopen the issue
Intermittently upon issuing az login, I get this issue now after installing docker desktop for mac.
I am also facing same issue. After giving command az login below URL is opened in browser. It has redirect_uri set to http://localhost:8400. I also have docker desktop for windows installed. Please note not issuing these commands from docker.
https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=04b07795-8ddb-461a-bbee-02f9e1bf7b46&redirect_uri=http://localhost:8400&state=ja4dweq5o1lcixmxrxq8&resource=https://management.core.windows.net/&prompt=select_account
Same problem here @iamrahul127