'Azure Devops capture the user who triggered the pipeline `

Morning , I have a question , is their a way to capture who triggered the pipeline , it will happen automatically when some one commit in my master branch in GITHUB , in the devops GUI i see the below and I need to capture that userid so in case of any issue i will send an email

enter image description here

I tried using Build.QueuedBy, Build.QueuedById, Build.RequestedFor but for all i get some values like

this is Microsoft.VisualStudio.Services.TFS  variable for the username
this is 00000002-0000-8888-8000-000000000000  ID of the user

but I need to capture AMADURO so I can easily send email to [email protected] , any help appreciated , thanks



Solution 1:[1]

Try Build.RequestedForEmail

See predefined variables

Solution 2:[2]

Maybe your usage is wrong. $(Build.QueuedBy) will hold the name of the user who triggered the build like the below example.

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex AIT
Solution 2 Jerry