Azure CLI initialization saying invalid login? -


i have opened free trial account azure , experiencing strange behavior trying install azure cli on fresh ubuntu vm....i printing steps trying below 1 1 in case else has experienced this.

  1. start ubuntu virtual machine, install azure cli tool, , run "az login". display web address plus code authenticate.
  2. open edge , clear browsing data (this includes cookies). close edge , re-open.
  3. go portal.azure.com , verify not signed in. displays login prompt (specifically, says "work or school, or personal microsoft account"). leave tab open now.
  4. in new tab, go aka.ms/devicelogin, put in authentication code, , click "continue". redirect the same microsoft login prompt above ("work or school, or personal microsoft account")

  5. enter outlook.com email address associated free trial. when tab password entry, redirect me different microsoft login screen me enter password.

  6. when type in (correct) password, tell me "we don't recognize user id , password". there no chance user id or password wrong. can verified refreshing still open tab step #3 (to portal.azure.com) , discovering logged azure portal. entering correct id/password, reason aka.ms/devicelogin telling me incorrect. other tab recognizing logged in.

has else experienced this? thinking might have fact have personal (@outlook.com) azure account work (@workdomain.com) account, i've cleared cookies deleted windows/web credentials in credential manager indicated in link: error: don't have valid access azure azure cli

install azure cli on fresh ubuntu vm

do open browser on vm or open browser on local pc?

i had test in lab, use outlook.com account test, when use linux vm cli 2.0 login azure, use local windows ie browser open https://aka.ms/devicelogin , type code, same error message you.

but when use windows pc cli 2.0 login azure, , use windows ie open page, works fine.

but when use linux vm cli 2.0 login azure hotmail.com, use local windows ie login it, works find.

it seems outlook account microsoft account, need sign-in verify.

as workaround, can use cli 2.0 login azure whit command:
az login -u xxx@outlook.com

enter image description here

then type password, login azure.


update:
workaround, can create service principal login cli:

about create service principal, can use command : az ad sp create-for-rbac:

about login cli:

az login --service-principal -u a487e0c1-82af-47d9-9a0b-af184eb87646d --password {password} --tenant {tenant} 

more information service principal, please refer link.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -