New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I keep getting this error Please run 'az login' to setup account. Using hyper as terminal client #4618
Comments
Are you seeing anything when run |
Please reactivate with more details |
Hi @yugangw-msft , I'm facing the same message here. Can you help me, please? "az account list" outputs:
"az login" outputs:
The client works from my notebook, but I needed to use the cli from an Azure VM. CLI Version: What version of the CLI and modules are installed? (Use az --version) OS Version: What OS and version are you using? Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows) Thanks |
We would also be highly interested in the solution if there is one ... thanks! |
This is the same with #6095 |
Ah, if it is a dupe I will close it again. |
Same error - I signed up to Free trial subscription. I can login from browser, and Account Center indicates I have 1 subscription active ('Free trial'). But AZ Cli (installed in Opensuse Tumbleweed using sudo zypper) and using bash shell from 'portal.azure.com' - both report the same error: 'Please run az login to setup account' |
@bytesemantics, could you run At the same time, could you check if there is anything in |
I was tempted to ask for this issue to be closed. I was using Chrome, and having read a linked ticket talking about Chrome and MFA issues, I thought I'd try Firefox. Logged in successfully in Firefox and noticed the Auth flow was different to chrome. Restarted Chrome and logged in successfully. I can understand this may not be easy to replicate - But from an end users perspective (particularly someone who is evaluating Azure as an alternate to GCP/AWS) - this is not something we should experience and Tech team need to solve it. |
Glad to know it is solved. Usually, this is caused by outdated AAD cache in Chrome. In such case, azure-cli/src/azure-cli-core/azure/cli/core/_profile.py Lines 901 to 913 in c508fa4
As it is hard to reproduce, it is also difficult for us to get the server-side error. It'll be great if you can share the warning message when you see it. It will help us refine the client-side message. Thanks! |
I get this error and using firefox does not fix it. I also am not allowed to share logs. |
@JCCChris, could you try cleaning the browser cache? If the issue persists, do you mind sharing the |
Using incognito mode worked. It seems like a problem with microsoft identity with cacheing unrelated to chrome or firefox. Both were affected. On previous attempts in both browsers, it did not ask for multifactor authentication. |
Hi @JCCChris, does clearing the browser cache fix this issue? I believe clearing the cache does the same thing as using incognito mode. |
In my case after logging in with |
|
Yes. This works. I tried it on Firefox incognito mode. |
Is there a normal solution to this bug? |
This is a showstopper, a red flag item. Everything depends on this, IaaC everything. |
@bkoprivica, please open a new issue and share more info by filling the issue template. |
It's surprising how after more than 4 years, microsoft has still not fixed this issue/bug. I've lost 3 hours of work time tonight and the issue has still not gone away. I have cleared my cache and tried all the other "fixes" suggested, yet here I still am like Groundhogs Day. Lawd!!!!! |
Petition to stop someone closing an issue unless they have clearly posted the steps to resolve the issue. (In the same issue tracker) |
FWIW -- I was having the same problem in an Azure VM. Turned out it was user error. I was using Ctrl+C to copy the device code from my ssh session which, of course, stops the az login process while copying the code. So, az login wasn't listening for the response and the login process didn't complete. |
Im having this issue as well. When I attempt to run 'dotnet run --interactive' I am receiving the error "Could not run xxx. Maybe your Azure credential needs a refresh with 'az login'". I then input 'az login' which redirects me to the azure login page on my browser, I login and my az account list runs in the terminal. I then run 'dotnet run -interactive' again and am met with the same error "Could not run xxx. Maybe your Azure credential needs a refresh with 'az login'". Any recommendations would be appreciated. |
Description
when trying to use az login and then running a cli command I get this
I keep getting this error Please run 'az login' to setup account.
I have signed in 100 times
this might be the cause by I am using hyper
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
installed via Ubuntu for windows
CLI Version: What version of the CLI and modules are installed? (Use
az --version
)Answer here: 2.0.18-1
OS Version: What OS and version are you using?
Answer here: windows 10
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here: Ubuntu upgraded to 16 bash.exe
The text was updated successfully, but these errors were encountered: