Azure-cli: az interactive in Azure Cloud Shell: authentication problem?

Created on 28 Jan 2018  路  4Comments  路  Source: Azure/azure-cli


Environment summary

  • Browser: Chrome Version 63.0.3239.132 (Official Build) (64-bit)
  • Azure Cloud Shell

In intractive mode of Azure Cloud Shell, I got the following message for any commands I execute,

yoichi@Azure:~$ az interactive
az>> vm list
Please run 'az login' to setup account.

So I tried to login by typing 'az login', however I got the message below. Then I closed the browser, opened the Azure Cloud Shell, and tried again but I got the same message.

az>> login
Azure Cloud Shell automatically authenticates the user account it was initially launched under, as a result 'az login' is disabled.
az>
Auth Cloud Shell Interactive P1 bug

All 4 comments

@yokawasa thank you for the report. I have reproduced the issue and we will address this in an upcoming release.

We cache the account info of a user upon az login.
The problem is that interactive looks into a different folder for this cached information and thus would require another login from interactive mode to get this information.
Unfortunately, a second login is not possible in cloudshell. A workaround until our next release would be to copy over the contents of ".azure" into ".azure-shell".
https://github.com/Azure/azure-cli/pull/5442 will make interactive mode look at the .azure for this info.

@williexu what is the specific bash command you executed in the shell? That's all anyone needs to know :)

Good point. Run cp -a .azure/. .azure-shell after starting up cloudshell.

Was this page helpful?
0 / 5 - 0 ratings