Earlier this year, we announced the public preview of APIs enabling developers to subscribe to change notifications for Microsoft Teams messages. Today, we’re excited to announce that change notifications for Teams messages are now generally available in the Microsoft Graph v1.0 endpoint for delegated scenarios. You can now filter your notifications to only those messages that contain specific text or that @mentions a given user. Developers can now listen to Teams messages in real time.
Using Microsoft Graph subscriptions, you can subscribe to messages in a particular channel or in a particular 1:1 or group chat. You can hear new messages, replies, edits, reactions, and deletes. With @mention and specific text filters, you can receive notifications in channel or chat matching the filtering criteria. With this feature users can setup workflows using Power Automate or app developers can listen to their chat and channel messages in real-time.
Some of the important features that you can now utilize include:
- Subscribe to all messages (and replies) in a channel.
- Subscribe to messages (and replies) in a channel that contains certain text.
- Subscribe to messages (and replies) in a channel that mentions a specific user.
- Subscribe to messages in a chat.
- Subscribe to messages in a chat that contain certain text.
- Subscribe to message in a chat in which a specific user is mentioned.
Like all Microsoft Graph webhooks, creating a subscription starts with passing in the URL of the webhook you want Microsoft Graph to call back to, and validating the subscription creation within your web service. When a new message arrives, Microsoft Graph will send that message to your webhook.
Next steps
See our pages create Subscription and change notifications for more information about Microsoft Teams messaging webhooks. Connect with us on Microsoft Q&A if you have feedback or suggestions for these APIs. We look forward to hearing from you.
Happy coding!