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:
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
}
]
}
]'