6

I checked the samples/API references here:

But cannot find how to mention someone in a new message to a channel.

2 Answers 2

10

Sorry this was never answered. This feature was added months ago - there are SDK methods called addMentionToText (Node.js) and AddMentionToText (C#) - source and usage samples here.

There's also an example here that's actually a bit more helpful. That example bot can be run very quickly on Glitch - repo and instructions are here.

Note that one of the challenges in using this API is that you have to have the user ID of the person you want to @ mention, and for that you need the team roster. Examples of how to do that are here.

4
  • microsoftteams.uservoice.com/forums/555103-public/suggestions/… this was the merged idea but probably I can follow the channel only, not push messages to mention someone special.
    – YvesR
    Oct 21, 2017 at 12:47
  • 1
    @YvesR There's this one for the mention support request on uservoice. Apr 12, 2018 at 8:07
  • @JohnStephenson Yeah, saw this already and commented. Development on our side in teams looks a bit slow, they probably focus on migrate Skype for business instead of make a valuable competitor to slack :)
    – YvesR
    Apr 17, 2018 at 13:31
  • 8
    Thanks Bill, is there any way to do this with the REST API? or inside a message posted to a channel via the REST API?
    – bc3tech
    Oct 26, 2018 at 17:26
2

Programmatic @mentions are not currently supported by Microsoft Teams, and will probably not come soon.

There is such a wish from the community in the MS uservoice portal, but it seems not to burn as much as other issues:

4
  • 1
    Downvoting, since it does not reflect the current state of affairs - see answer from Bill Bliss. Oct 16, 2017 at 14:33
  • 2
    @Rich Moe - You mention 'soon'. Can you be more specific? It's been over a year and this still isn't available. Is there somewhere where we can see this, on a backlog or schedule of some sort? Apr 13, 2018 at 8:31
  • Exactly, there is no time frame mentioned even in the latest update microsoftteams.uservoice.com/forums/555103-public/suggestions/…
    – Yuri
    Dec 8, 2020 at 8:02
  • @HeinrichUlbricht Upvoting as this is not a bot question, it's a webhook question. There is still no proper solution to this, it's stuck in the backlog.
    – Corey
    Jul 27, 2021 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.