so for updating azure pipeline permission for resource, I already found that we can achieve that through using api calls like https://learn.microsoft.com/en-us/rest/api/azure/devops/approvalsandchecks/pipeline-permissions/update-pipeline-permisions-for-resource?view=azure-devops-rest-7.1&tabs=HTTP
the question will be can we use cli to achieve the same outcome?
for cli permission manage I only found https://learn.microsoft.com/en-us/azure/devops/organizations/security/manage-tokens-namespaces?view=azure-devops#update-permissions
but it only does something like You can assign allow or deny permissions to a specified user or group
, not exactly what I am looking for
so wondering if there are ways to use cli only to achieve the patch operation above
big thanks
2
Answers
The Azure DevOps REST API "Pipeline Permissions – Update Pipeline Permisions For Resource" is used to update the pipeline permissions on using the following resource: agent pool, environment, agent queue, repository, secure files, service connection, and variable group.
Currently, there is no corresponding Azure DevOps CLI can do the same things. There is also no separate CLI for each resource to update the pipeline permissions on the resource.
If your projects really need this feature, I recommend you try to report a feature request on Developer Community. That will make it more convenient for the product teams to receive and understand your ideas. And your feedback also could be helpful for improving the Azure DevOps products.
There is not specific option for this in Azure CLI. But it that case you can always use
az devops invoke
[Here] is a quite good blog post about this but in general your call should be something like this
based on this entry