Azure-cli: Azure Login Doesn't Work

Created on 11 Aug 2017  Â·  10Comments  Â·  Source: Azure/azure-cli

Description

Outline the issue here:
I and my collages in my team are unable to log into azure using the Azure 2.0 CLI. Please refer to Microsoft case [REG:117071416044145] for more information.

$ az login
To sign in, use a web browser to open the page https://aka.ms/devicelogin and enter the code B96KZELHQ to authenticate.
No subscriptions were found for 'None'. If this is expected, use '--allow-no-subscriptions' to have tenant level accesses

Environment summary

Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)

curl -L https://aka.ms/InstallAzureCli | bash

CLI Version: What version of the CLI and modules are installed? (Use az --version)

azure-cli (2.0.12)

acr (2.0.9)
acs (2.0.11)
appservice (0.1.11)
batch (3.0.3)
billing (0.1.3)
cdn (0.0.6)
cloud (2.0.7)
cognitiveservices (0.1.6)
command-modules-nspkg (2.0.1)
component (2.0.6)
configure (2.0.10)
consumption (0.1.3)
container (0.1.7)
core (2.0.12)
cosmosdb (0.1.11)
dla (0.0.10)
dls (0.0.11)
feedback (2.0.6)
find (0.2.6)
interactive (0.3.7)
iot (0.1.10)
keyvault (2.0.8)
lab (0.0.9)
monitor (0.0.8)
network (2.0.11)
nspkg (3.0.1)
profile (2.0.9)
rdbms (0.0.5)
redis (0.2.7)
resource (2.0.11)
role (2.0.9)
sf (1.0.5)
sql (2.0.8)
storage (2.0.11)
vm (2.0.11)

Python (Darwin) 2.7.10 (default, Feb  7 2017, 00:08:15)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]

Python location '/Users/mbernadin/lib/azure-cli/bin/python'

OS Version: What OS and version are you using?
MacOS 10.12.6

Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Bash

Auth

Most helpful comment

Use az cloud set -n AzureUSGovernment and az cloud set -n AzureCloud to get back to the public one
use az cloud list for other cloud environments you can switch to

All 10 comments

No subscriptions were found for 'None'. If this is expected, use '--allow-no-subscriptions' to have tenant level accesses

Could you please confirm whether this is the case for your team?
If you log in through portal, are you seeing any subscriptions?

Yes. This happens for any user on my team as well. When we log into the
azure portal, we do see our subscription and are able to launch vms against
it and everything. It's our shared company subscription. We are able to use
the old azure cli and able to see the subscription there but none of us are
able to use the Azure 2.0 cli.

On Mon, Aug 14, 2017, 10:49 Yugang Wang notifications@github.com wrote:

No subscriptions were found for 'None'. If this is expected, use
'--allow-no-subscriptions' to have tenant level accesses

Could you please confirm whether this is the case for your team?
If you log in through portal, are you seeing any subscriptions?

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Azure/azure-cli/issues/4206#issuecomment-322259577,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AITEEiqwzMGu8vzRfCVcR7c2KCpu9uiYks5sYIijgaJpZM4O0_Xq
.

Interesting, @bernadinm could you run az login --debug, and send me the trace at yugangw at microsoft dot com?

Thank you! Sent!

Per our mail exchange, the cause was the government cloud was picked up but the subscription comes from the public cloud. After switched to the right cloud, things started to work.
So i am closing this issue, as login works correctly.

How do you change between the government and public cloud?

Use az cloud set -n AzureUSGovernment and az cloud set -n AzureCloud to get back to the public one
use az cloud list for other cloud environments you can switch to

I had the same issue, this helped.

I have same issues, I can able to login but getting error:

You have logged in. Now let us find all the subscriptions to which you have access...
No subscriptions were found for 'None'. If this is expected, use '--allow-no-subscriptions' to have tenant level accesses

In the above comments mentioned Need to change over to public cloud instead of government cloud.

So here government cloud means Private cloud?

If we need to work on Private cloud with Azure CLI commands does it work

Government cloud is so called sovereign clouds. Private cloud means Azure Stack.
The message of 'No subscriptions were found' means the account went through the authentication doesn't have accesses to any subscriptions.

Was this page helpful?
0 / 5 - 0 ratings