question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Azure CLI v2: "--allow-no-subscriptions"

See original GitHub issue

I have created a connection to Azure using a Service Principal which is not assigned to any subscription. The SP has permission to make changes only to the Azure AD tenant (I need to run commands like az ad app update only).

When using that connection with the AzureCLI v2 task, the task always fails with the error:

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

It doesn’t look like there’s a way to pass the --allow-no-subscriptions flag.

The workaround for me was to create a new bogus resource group with no resources inside and grant the SP access to that RG so at least it has a subscription. However, there should be a way to have --allow-no-subscriptions.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:11
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ItalyPaleAlecommented, Dec 1, 2019

I understand. My purpose in creating this issue was two-fold:

  1. Bring it up so the devs are aware of it.
  2. Write my workaround here in hope it can help others. The workaround is quite simple (albeit not very clean 😃 ) anyways.
1reaction
a-visharcommented, Feb 11, 2020

Any resolution to this? This is currently causing our build pipelines to fail transiently…

Read more comments on GitHub >

github_iconTop Results From Across the Web

az | Microsoft Learn
Demos for designing, developing and demonstrating Azure CLI. az deployment ... Manage Azure Machine Learning resources with the Azure CLI ML extension v2....
Read more >
"az login --allow-no-subscriptions" not supported anymore?
ERROR: No subscriptions found for this account. How can I login via azure-cli into my B2C tenant directory, in order to navigate through...
Read more >
Authenticating via the Azure CLI | Guides | hashicorp/azuread
Logging into the Azure CLI ... The --allow-no-subscriptions argument enables access to tenants that have no linked subscriptions, in addition to tenants that...
Read more >
No subscriptions were found for 'None' Error after az login why ...
From the local machine you need to install Azure CLI but also your ... If this is expected, use '--allow-no-subscriptions' to have tenant ......
Read more >
AzCLI task fail to login service connection
task: AzureCLI@2 displayName: Run regression tests inputs: azureSubscription: ... --tenant *** --allow-no-subscriptions" 2021-03-29T07:19:31.8025660Z ERROR: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found