Home > Back-end >  Unable to grant secure file permissions to a pipeline via REST API
Unable to grant secure file permissions to a pipeline via REST API

Time:12-23

I have an Azure DevOps pipeline that publishes a secure file to the pipeline library. What I would like to do is immediately grant that file permissions to a pipeline (so that I don't have to go in and manually do so). I have been following this documentation:

enter image description here

enter image description here

enter image description here

enter image description here

Modify your script as below:

curl --location --request PATCH 'https://dev.azure.com/{organization}/{project}/_apis/pipelines/pipelinepermissions/{resourceType}/{resourceId}?api-version=7.0-preview.1' \
--header 'Authorization: Basic {myAuth}  ' \
--header 'Content-Type: application/json' \
--data-raw '[
  {
    "pipelines": [
      {
        "id": {myPipelineId},
        "authorized": true
      }
    ]
  }
]'
  • Related