question

alexfeng-6406 avatar image
0 Votes"
alexfeng-6406 asked kobulloc-MSFT edited

Using az cli in Azure Pipeline: ERROR: Insufficient privileges to complete the operation

Hi all,

I'm trying to assign a RBAC in Azure pipeline, I'm using below task in the yaml file

  • task: AzureCLI@2
    inputs:
    azureSubscription: 'AzureRmPipeline-conn'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: 'az role assignment create --role "Storage Blob Data Contributor" --assignee <some email> --scope "<some scope>'
    addSpnToEnvironment: true


AzureRmPipeline-conn is service connection to the subscription and I can use it deploy resource to the resource group already.

However when I run the pipeline I got below error

ERROR: Insufficient privileges to complete the operation.

[error]Script failed with exit code: 1


Does anyone know how to resolve that? Many thanks!

Regards,
Alex

not-supported-azure
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

kobulloc-MSFT avatar image
0 Votes"
kobulloc-MSFT answered

Thank you for reaching out! Azure DevOps and its services are not supported in Microsoft Q&A because the Azure DevOps team and DevOps community are actively answering questions here:

https://developercommunity.visualstudio.com/spaces/21/index.html

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.