-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Azure CLI v2: "--allow-no-subscriptions" #11846
Comments
Thanks for raising this issu @ItalyPaleAle. Although this is a valid scenario, we haven't heard this request from community till now. We would like to gather more feedback before trying to support this scenario. |
I understand. My purpose in creating this issue was two-fold:
|
I have the same issue: There are a number of use cases where we want per-pipeline auth using AzureAD for access to non-Azure resources. ADO and AzureAD are SaaS services, tying them to Azure for authentication of a pipeline seems kinda odd. We need to leverage the JWT of the pipeline to access other services that validate against AzureAD for access. |
This is Azure CLI task and hence it is designed to be used for Azure resources only.
ADO has service connections which can be used to gain access to those services by validating against identity providers (including AAD). Is that not what you can use? |
Azure AD (and Azure DevOps) are Azure resources. |
I think that is exactly what we are trying to do, and so no, it cannot be used unless the service principal is granted access to an Azure Resource Group, which it does not need. @ItalyPaleAle is correct - the Azure CLI is the CLI for Azure, Azure AD ( Just to be clear, when I say non-Azure resources, I mean applications registered in AzureAD that exist in the OAuth environment provided by a paid AzureAD tenant. The pipeline needs to authenticate to AzureAD and obtain a JWT token ( |
I have the same issue while trying to create a resource group from the build pipeline. The usual AzureResourceGroupDeployment task with ARM templates does not work(another open issue), so I was trying to use the AzureCLI task with an inline script "az group create -l |
Any resolution to this? This is currently causing our build pipelines to fail transiently... |
@a-vishar See my workaround in the first comment. Not a fix, but effective. |
@ItalyPaleAle - It's a transient problem, the management group has access to everything, for some reason it just isn't resolved correctly 1/20 times. |
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:
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
.The text was updated successfully, but these errors were encountered: