Mention Azure DevOps user

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.

createbug_workitemdevops

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.

mentionupdatecomment_azuredevops

Happy testing!

You may also like...

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.