web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Mention person in azur...
Power Automate
Unanswered

Mention person in azure devops work item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Is there any way to mention a owner of that work item in discussion section by adding some comments from flow 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,870 Most Valuable Professional on at

    Hi @Phani,

     

    This should be possible via the Send an HTTP request to Azure DevOps action and the add Comment method of the Azure DevOps Rest API 6.0:

    https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/comments/add?view=azure-devops-rest-6.0

     

    You can use a html in the text of comment to refer to mention the user. Use a hyperlink and the data-vss-mention with the specific userid of the devops user you want to mention.

     

    Below is an example of that.
    Replace ad96260c-ea80-6eeb-93b0-c942399631d0 by the correct userid.

     

    {"text": "<div><a href=\"#\" data-vss-mention=\"version:2.0,ad96260c-ea80-6eeb-93b0-c942399631d0\">@John Doe</a>&nbsp; Test mentioning</div>"}

     

    mentionincomment.png

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on at

    @Expiscornovus : Thanks for the solution but how can we get the user guid ( I can only have their alias or fullname ) 

     

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on at

    @Expiscornovus  : I got the user id using GETUser from AAD but even though have mentioned it , the user not getting any DevOps notifications email when someone mentioned you but they are getting same notification email when i manually tag them

  • Expiscornovus Profile Picture
    33,870 Most Valuable Professional on at

    Hi @Phani,

     

    It is not the AAD id. It is the Object Id from the Azure DevOps user.


    I found that in the Organization Settings > Manage Users. Used the developer toolbar to retrieve that id. Found it in the GetMemberEntitlementsBatch Post request in the Json response of that request.  

     

    getobjectid.png

  • PJ-10092242-0 Profile Picture
    Microsoft Employee on at

    Hi @Expiscornovus 

    Have done the same . I got the user object ID, using below api and used that in mention but it did not worked out 

     

    Phani_0-1622564057718.png

     

  • Expiscornovus Profile Picture
    33,870 Most Valuable Professional on at

    Hi @Phani,

     

    Apologies if I wasn't clear. But it is not the Azure Active Directory Object Id I am using, it is the Azure DevOps Object Id/User Id I am using in the mention, which is a different guid.

     

    I believe you can also find it via the User Entitlements summary:

    https://developercommunity.visualstudio.com/t/how-to-get-user-entitlement-api-userid-with-princi/858734

     

  • IanCeicys Profile Picture
    5 on at

    Here's how I solved getting the userid so I could have the correct userid value for the @mention. 

     

    Use get work item call to find the assign to user's id.

     

    2 min video - Mention API Azure DevOps - YouTube

     

    "text": "<div><a href=\"#\" data-vss-mention=\"version:2.0,{variable}
  • Cgangweg01 Profile Picture
    881 Super User 2026 Season 1 on at

    Hello -

    I figured out how to get the Azure DevOps user ID from users who submit a Teams Form which will update a work item with a comment including the @mention for the user identified via a variable in my flow. However, when I try to insert a variable for the @Jane Doe part of the HREF <a> tag it inserts the variable expression instead of the value. Can you help me construct this html with a variable for the @Jane Doe part?

  • Cgangweg01 Profile Picture
    881 Super User 2026 Season 1 on at

    Never mind, got it to work with single quotes around the variable. Thanks for the post.

  • DavidCHolley Profile Picture
    4 on at

    @Expiscornovus Would you please post the string for the Relative URI and Body without any of the variables? Thank you for the example, but without seeing how the variables are being set as well as their values understanding how to make the request becomes difficult for those of us starting out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard