{"id":6214,"date":"2021-04-20T12:00:55","date_gmt":"2021-04-20T20:00:55","guid":{"rendered":"https:\/\/officedevblogs.wpengine.com\/?p=6214"},"modified":"2021-04-20T12:00:55","modified_gmt":"2021-04-20T20:00:55","slug":"utilize-change-notification-apis-for-microsoft-teams-messages","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/utilize-change-notification-apis-for-microsoft-teams-messages\/","title":{"rendered":"Utilize change notification APIs for Microsoft Teams messages"},"content":{"rendered":"<p>Earlier this year, we announced the <a href=\"https:\/\/developer.microsoft.com\/en-us\/graph\/blogs\/announcing-change-notifications-for-microsoft-teams-messages\/\">public preview of APIs enabling developers to subscribe to change notifications for Microsoft Teams messages<\/a>. Today, we&#8217;re excited to announce that change notifications for Teams messages are now generally available in the Microsoft Graph v1.0 endpoint for delegated scenarios.\u00a0 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.<\/p>\n<p>Using Microsoft\u00a0Graph\u00a0 subscriptions, you\u00a0can 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\u202f@mention\u00a0and\u00a0specific text filters,\u202fyou can\u202freceive notifications\u202fin\u00a0channel or chat\u00a0matching the filtering criteria. With this feature users can setup\u00a0workflows\u00a0using\u00a0Power Automate\u00a0or\u00a0app\u00a0developers\u00a0can\u00a0listen to their chat and channel messages in real-time.<\/p>\n<p>Some of the important features that you can now utilize include:<\/p>\n<ul>\n<li>Subscribe to all messages (and replies) in a channel.<\/li>\n<li>Subscribe to messages (and replies) in a channel that contains certain text.<\/li>\n<li>Subscribe to messages (and replies) in a channel that mentions a specific <span style=\"font-weight: normal !msorm\">user.<\/span><\/li>\n<li>Subscribe to messages in a chat.<\/li>\n<li>Subscribe to messages in a chat that contain certain text.<\/li>\n<li>Subscribe to message in a chat in which a specific user is mentioned.<\/li>\n<\/ul>\n<p>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.<\/p>\n<h4>Next steps<\/h4>\n<p>See\u00a0our pages <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/subscription-post-subscriptions?view=graph-rest-1.0&amp;tabs=http\">create Subscription<\/a> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/webhooks?view=graph-rest-1.0\">change notifications <\/a>for more information about Microsoft Teams messaging webhooks.\nConnect with us on <a href=\"https:\/\/docs.microsoft.com\/en-us\/answers\/topics\/office-teams-app-dev.html\">Microsoft Q&amp;A<\/a> if you have feedback or suggestions for these APIs. We look forward to hearing from you.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Change notifications for Microsoft Teams messages are now generally available in the Microsoft Graph v1.0 endpoint for delegated scenarios.<\/p>\n","protected":false},"author":69074,"featured_media":25159,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3,128],"tags":[],"class_list":["post-6214","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","category-microsoft-teams"],"acf":[],"blog_post_summary":"<p>Change notifications for Microsoft Teams messages are now generally available in the Microsoft Graph v1.0 endpoint for delegated scenarios.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69074"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=6214"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/6214\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/25159"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=6214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=6214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=6214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}