How to send a user notification in a chat message, with @username, via Microsoft Graph

Tony Lockhart 106 Reputation points
2022-03-04T15:54:10.51+00:00

Hi All,

I would like to send a notification to a specific user, via a Microsoft-Graph chat message, using @Tablet . In order to work as expected, I would need to populate a list of users, in the client, and filter the list based on user input, and add the selected @Tablet to the chat message. Once, the message is sent to the API, I'm not sure if I would need to parse the chat message and send the message to a web-hook or a subscription service. I did find information on sending notifications @Dieter . However it looks like this feature has been deprecated, or in beta. Are there any features in production or in the Microsoft Toolkit that can assist with this task? If so, can you point me to any relevant documentation, or javascript code samples?

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. Ramjot Singh 861 Reputation points Microsoft Employee
    2022-03-04T18:26:55.963+00:00

    You can refer to https://learn.microsoft.com/en-us/graph/api/chatmessage-post?view=graph-rest-1.0&tabs=http#example-2--a-user-in-a-channel-message on how to send message with an atmention on it. Sending a message with atmention automatically sends a notification to the target user.

    If you want to send notifications to user in Teams (for something other than at mention for example) please refer to https://learn.microsoft.com/en-us/graph/teams-send-activityfeednotifications

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.