In many products nowadays it is possible to mention a user, Azure DevOps is one of them. In this blog I will share how to mention an Azure DevOps user in a work item from a Power Automate flow.
Original request
This question was originally posted on the Power Automate forums and was my inspiration for this blog.
Is there any way to mention a owner of that work item in discussion section by adding some comments from flow.
Mention person in azure devops work item
Data-vss-mention
Turns out this can easily be solved by using a html hyperlink with a specific tag, data-vss-mention. You can use this mark-up with the Comment method from Azure DevOps REST API 6.0.
I found this solution approach in this StackOverflow thread, VSTS – uploading via an excel macro and getting @mentions to work
Mention flow example
Below is an example of creating a bug and mentioning a specific user based on their Azure DevOps user id.
1. Add a create a work item Azure DevOps action.
2. Add a Send an HTTP request to Azure DevOps action. Configure it to use a POST request with the comment method. In this action I am using variables for the Project and the DevOps User id.
Happy testing!



How do you get de user id? Which is the correct format? (aad.XXX??) or large format (microsoft.etcetc)
Thanks in advance
Hi Alberto,
You could use a REST API call to get that user id. You can use a Personal Access Token to interact with the below method:
https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users/list?view=azure-devops-rest-7.1
It should return a GUID for the Azure DevOps user (in other words 32 digits with hyphens), something like the below format:
9ce68702-0694-6ef4-b9fa-0f3143502233