Skip to main content

Microsoft Graph: Developer Blog

Excel Microsoft Teams Office 365 OneDrive OneNote Outlook SharePoint

Microsoft Graph webhooks update – March 2016

Hi folks, we’ve got another incremental update for our Microsoft Graph webhooks preview on the journey towards shipping a production release.  First, I’m pleased to say we’ve rounded out the set of available operations with support for DELETE and PATCH, as well as POST and GET.

Now, you can delete an existing subscription with the following http code:

And you can extend the expiration time on a subscription with the following simple patch command:

Subscriptions to Outlook data will have a maximum expirationDateTime of 4230 minutes from the time of subscription creation. It’s a good idea to use this new PATCH functionality to extend your subscription well before it times out.

We’ve also made a couple of changes to the property names for working with subscriptions, so we’re more consistent across Microsoft APIs, and we’ve added a requirement to set the expirationDateTime explicitly when you create a subscription. Here’s the new code:

If the request succeeds, the response will be:

If your expirationDateTime is beyond the range that the resource you asked for supports, then you’ll get a 400 error.

The eagle-eyed among you will notice we’ve changed the ‘subscriptionId’ property to be just ‘id’, and the ‘subscriptionExpirationDateTime’ to be just ‘expirationDateTime’.

We expect these changes to be the final ones to the API shape now before we go to production.

Enjoy the new APIS, and as always, reach out to us on Twitter with the #MicrosoftGraph hashtag with your feedback.

Gareth and the webhooks team.