Skip to content

[Bug] Misleading/Incompolete domain Bug #973

Open

Description

@its-ernest

Misleading/Incompolete domain Bug
A typo returned by the login server while logging into azure using az cli. The CLI instructed me to use use-device-code to avoid getting login failure I was having, and the URL it provided was not not working. I had to guess to get the right domain to use in my browser: login.mircosoftonline.com rather worked

To Reproduce
Steps to reproduce the behavior:
log into Azure CLi using:

az login --use-device-code
# Output looked like this:
To sign in, use a web browser to open the page https://login.microsoft.com/device and enter the code ....

Expected behavior
I expected the URL provided by the CLI to work flawlessly and quick, which couldn't happen

What you see instead

The MSAL Python version
python -c "import msal; print(msal.__version__)"

% az version                           
{
  "azure-cli": "2.90.0",
  "azure-cli-core": "2.90.0",
  "azure-cli-telemetry": "1.1.0",
  "extensions": {}
}

Additional context
After thorough huntinh, I found out that the device code message URL (https://login.microsoft.com/device) is not generated by Azure cli or msal python. It's returned directly by the Microsoft server as the verification_uri field in the device authorization response json. Both Azure CLI and msal just print it as-is (flow["message"])

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions