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 sets "--allow-no-subscriptions" argument

See original GitHub issue

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AzureCLIV2

  • Agent - Private:
Name Value
Agent.Version 2.165.0
Agent.OS Windows_NT
Agent.OSArchitecture X64
Agent.OSVersion 10.0.18363
AzurePS 1.6.1

Task YAML:

steps:
- task: AzureCLI@2
  displayName: 'Upload DeploymentServerInterfaceDLL to Azure'
  inputs:
    azureSubscription: 'Visual Studio Ultimate with MSDN(Converted to EA) (xxx)'
    scriptType: ps
    scriptLocation: inlineScript
    inlineScript: |
     #my script here
    addSpnToEnvironment: true
    useGlobalConfig: true
    workingDirectory: '$(System.DefaultWorkingDirectory)\$(Release.PrimaryArtifactSourceAlias)'

Task fails with the following error: The subscription of ‘xxx’ doesn’t exist in cloud AzureCloud’.

I have noticed this failure in AzureCLI V2.0.14 where the only difference is “–allow-no-subscriptions” argument is being set. I am not sure why that argument is now being provided, as there have been no changes to the task on our end. image

Last successful run was in AzureCLI V2.0.8 image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
issacnitincommented, Jun 2, 2020

@MetalWing I came across a bug in Az CLI version 2.0.71 https://github.com/Azure/azure-cli/issues/11059

Please update az cli version in your private agent to 2.0.77+, that should do the trick

1reaction
issacnitincommented, Jun 2, 2020

You can run the command az account list to list all subscriptions that the service principal you use have access to.

Read more comments on GitHub >

github_iconTop Results From Across the Web

az | Microsoft Learn
Manage Azure CLI configuration. This command is interactive. For automation scenarios or to set all available options, use the new az config ....
Read more >
AzureCLI@2 - Azure CLI v2 task - Microsoft Learn
Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell ...
Read more >
Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >
Install and set up the CLI (v2) - Azure Machine Learning
The ml CLI extension (sometimes called 'CLI v2') for Azure Machine Learning sends operational data (YAML parameters and metadata) over the ...
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 >

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