azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

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

Open robinpecha opened this issue 2 years ago • 6 comments

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

robinpecha avatar Jan 10 '24 14:01 robinpecha

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

yonzhan avatar Jan 10 '24 14:01 yonzhan

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 ?

jiasli avatar Jan 11 '24 12:01 jiasli

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

Thank you, done:

image

robinpecha avatar Jan 11 '24 12:01 robinpecha

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.

robinpecha avatar Jan 11 '24 12:01 robinpecha

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

akudrinsky avatar Feb 27 '24 09:02 akudrinsky

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

kmatyukhin avatar Apr 26 '24 08:04 kmatyukhin

Same problem here

m1iktea avatar Jun 24 '24 06:06 m1iktea