az login redirects to localhost instead of authenticating

SKate 136 Reputation points

When using CLI to login:
az login
the browser opens this page

which then redirects me to http://localhost:55322

Expected behavior is to authenticate, and have the CLI available for further use.

This was working yesterday. Was there some kind of update that could have caused this behavior?

The login via device code with
az login --use-device-code
still works.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,854 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Buist, Eric 25 Reputation points

    This continues to happen, since last Friday. azure-cli 2.47.0 core 2.47.0 telemetry 1.0.8 Dependencies: msal 1.20.0 azure-mgmt-resource 22.0.0 This could be because the CLI runs from within WSL 2, but it was working a week ago. az login still works from Powershell.

    5 people found this answer helpful.

  2. SKate 136 Reputation points

    This appears to be resolved today.

    2 people found this answer helpful.

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    Comments have been turned off. Learn more