How to mention a user/group in a new message to a channel?

前端 未结 2 486
一向
一向 2020-12-16 05:37

I checked the samples/API references here:

  • https://msdn.microsoft.com/en-us/microsoft-teams/connectors
  • https://dev.outlook.com/Connectors/GetStarted
相关标签:
2条回答
  • 2020-12-16 06:18

    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:

    0 讨论(0)
  • 2020-12-16 06:37

    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.

    0 讨论(0)
提交回复
热议问题