Azure CLI V2 sets "--allow-no-subscriptions" argument
See original GitHub issueQuestion, 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.
Last successful run was in AzureCLI V2.0.8
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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
You can run the command
az account list
to list all subscriptions that the service principal you use have access to.