Forum Discussion
blayton
Aug 05, 2022Copper Contributor
Need to specify RequestedFor when running pipeline via REST api
I'm triggering a pipeline via https://docs.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/run-pipeline?view=azure-devops-rest-6.0. I'm using the Pipelines API instead of the Build API so I can specify several repository resources. However, when the run is triggered in my pipeline I'm using the $(System.AccessToken) and the resulting run is running as the "Project Collection Build Service" instead of the user running the build.
I've tried adding "requestedBy" and "requestedFor" to the initial request, as well as trying to PATCH the build after the fact but nothing seems to set those fields.
tl;dr How do I queue a build where I can specify the "requestedFor" and specify multiple repository resources?
No RepliesBe the first to reply