setting requestedFor and requestedBy when queuing a build through API

Anantha Prakash, Karthik 1 Reputation point


I'm trying to use this API - to queue a build fr pipeline B from another pipeline A. I would like to set requestedBy and requestedFor when this build is queued. I tried passing these in request body
"definition": {
"id": some-id
"requestedFor": {
"displayName": "some-name"
In the build pipeline B that was queued, I printed the below value: $(Build.RequestedFor)
but I always see the dispslay name of the user I used when i made the API request. How do i override this to a user i want?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,987 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JananiRamesh-MSFT 22,711 Reputation points

    Hi @Anantha Prakash, Karthik Welcome to Microsoft Q&A! Thanks for posting the question.

    DevOps is currently not supported in the Q&A forums; the supported products are listed over here (more to be added later on).
    You can ask the experts in the dedicated forum over here:

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    0 comments No comments