5

I am currently try to use the Microsoft Graph API to cancel a set of recurring meetings using the following call:

POST /users/{prinicipalName}/calendar/events/{id}/cancel

And I am getting back Unsupported segment type error.

I can delete events one at a time, but I need a way to cancel all events in a recurrence. Any help would be much appreciated.

1 Answers1

3

There isn't a /cancel endpoint.

If you want to remove recurrences from a meeting, you need to set the recurrence pattern to null:

PATCH https://graph.microsoft.com/v1.0/users/{userPrincipalName}/events/{id}
Content-type: application/json

{
  "recurrence": null,
}
Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63
  • I just tried this, looks like it didn't work. I was able accomplish what I needed by using the seriesMasterId and setting thats recurrence to null. Thanks. – TrevorForbin Mar 30 '18 at 19:04
  • My assumption was that you _were_ using the series master. Instances wouldn't have a recurrence since they're the _result_ of the recurrence pattern. – Marc LaFleur Mar 30 '18 at 19:06
  • Ah, sorry I should've been more descriptive – TrevorForbin Mar 30 '18 at 19:12