Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Pages Menu
TwitterRssFacebook

Posted by on Sep 29, 2023 in Development, Microsoft Teams

Introducing graphnotifications.dev – a better way to create Microsoft Graph Change Notifications

Introducing graphnotifications.dev – a better way to create Microsoft Graph Change Notifications

Microsoft Graph Change Notifications (aka webhooks) are great. They allow for a style of programming which can be much more event driven and therefore more scalable, with less “checking” code, polling delays and deduplication just to try and work out what’s changed. When you want to take action on something happening in Microsoft Graph, they are better in every way.

However, the process of subscribing to a new Microsoft Graph change notification can be tricky to get your head around, especially if you’re not experienced in using them. There is, thankfully, a common endpoint in Microsoft Graph to add, list and remove subscriptions, but because this is the only place to create a new subscription, it’s necessary to know the name of the resource in Microsoft Graph you want to subscribe to.

There are many different events you can subscribe to, and they each have a unique resource name. So, the first hurdle is to find what you want to subscribe to, and its resource name.

Microsoft Graph is an abstraction of different capabilities and resources across Microsoft 365 and, as such, different resources are managed by different teams within Microsoft. This can lead to inconsistencies and variations around subscription expiry times, required parameters and so on. Whilst these are documented, it’s sometimes necessary to visit several different pages in order to find out the syntax for the subscription request, the name of the resource, the longest possible expiry time, etc.

This was annoying me, and I figured that it’s probably annoying other people and, worse, probably putting some people off getting into Change Notifications, so I decided to do something about it:

The Microsoft Graph Change Notification Builder enables to you quickly create syntactically correct body payloads for new Change Notification requests. All the possible subscription types are listed in one place, sorted by Microsoft product. The resource names will always be correct, and the expiry times will be within the bounds of the resource. The Builder will show you which fields are required, which are optional and will highlight any quota limits to be aware of. The aim is to distill all the information about a Graph Change Notification into a single place and avoid wasted time in looking everything up.

You can try the Builder today at https://graphnotifications.dev. It’s free to use, and I’d love your feedback if you find something wrong or if you have ideas to make it better. For instance, I’m already thinking it would be useful to provide links back to the documentation pages for each resource alongside the code.

By default, the Builder will only show subscriptions that are on the v1.0 endpoint and Generally Available, but you can also choose to include Beta resource types, such as these new Microsoft Teams resources to be notified about new recordings and transcripts:

Why not try it the next time you have a Microsoft Graph subscription to create? I think you’ll find it quicker, easier and more enjoyable than your current method! 🙂

Written by Tom Morgan

Tom is a Microsoft Teams Platform developer and Microsoft MVP who has been blogging for over a decade. Find out more.
Buy the book: Building and Developing Apps & Bots for Microsoft Teams. Now available to purchase online with free updates.

Post a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share to Microsoft Teams