Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

az login --use-device-code fails with "Sign in to an organisation" #28165

Open robinpecha opened 8 months ago

robinpecha commented 8 months ago

Describe the bug

Im trying to log in az login --use-device-code with "Sign in to an organisation" but it ends on 404 error on login page.

Repeated many times in many browsers (including incognito). Its not working from azure vm instance nor from my local pc.

az-login-device-code+sign-in-to-an-organisation-bug-01 az-login-device-code+sign-in-to-an-organisation-bug-02 az-login-device-code+sign-in-to-an-organisation-bug-03 az-login-device-code+sign-in-to-an-organisation-bug-04 az-login-device-code+sign-in-to-an-organisation-bug-05 az-login-device-code+sign-in-to-an-organisation-bug-06 az-login-device-code+sign-in-to-an-organisation-bug-07

Related command

az login --use-device-code

Errors

404 This login.microsoftonline.com page cant be found.

Issue script & Debug output

...

Expected behavior

Grant access from cli.

Environment Summary

azure-cli 2.56.0 latest installed on azure ubuntu 22.04 vm instance deployed today

Additional context

No response

yonzhan commented 8 months ago

Thank you for opening this issue, we will look into it.

jiasli commented 8 months ago

It seems the error page is caused by Microsoft Entra's server. Let me have some discussion with Microsoft Entra team internally.

Meanwhile, could you create a support ticket at https://azure.microsoft.com/en-us/support/create-ticket ?

robinpecha commented 8 months ago

Meanwhile, could you create a support ticket at https://azure.microsoft.com/en-us/support/create-ticket ?

Thank you, done:

image

robinpecha commented 8 months ago

Btw it works on the same vm after installing desktop and browser: image

For those who are in a hurry and need a workaround:

sudo apt install lubuntu-desktop -y
sudo apt install xrdp -y
sudo apt install firefox -y # optional
sudo reboot # optional
sudo passwd myusername # add password to your username
sudo systemctl start xrdp

# dont forget to add rdp port to your vm
portal.azure.com > Virtual Machine > %current machine% > Networking > Add inbound port rule > Destination port ranges: 3389 > Add

Then you can connect with your rdp client (remmina in my ubuntu) with previously configured credentials.
akudrinsky commented 6 months ago

@jiasli are there any updates or better workarounds than installing lubuntu-desktop and firefox? I encountered exactly the same problem

kmatyukhin commented 4 months ago

The same problem for me. Is someone working on this issue?

m1iktea commented 2 months ago

Same problem here

Seefin commented 1 week ago

Same here, any news?

fsuarezo commented 4 days ago

I'm having the same issue. But M$ doesn't seem to be looking here anymore... C'mon Microsoft, we need to work!