-->

Microsoft Graph APi not returning “Cancelled” Even

2020-07-25 04:19发布

问题:

I am trying to get all the events in a Conference room's calendar with Microsoft graph API, given a startDateTime and endDateTime. I tried the following API's -

1. https://graph.microsoft.com/v1.0/users/{id}/events?startDateTime=2017-03-20T05:00:00.0000000&endDateTime=2017-04-06T21:00:00.0000000
2.https://graph.microsoft.com/v1.0/users/{id}/calendar/calendarView?startDateTime=2017-03-20T05:00:00.0000000&endDateTime=2017-04-06T21:00:00.0000000

The response includes all events with isCancelled=false. How do I fetch events which were Cancelled?

&$filter=isCancelled%20eq%20true also returned empty as there are no events with isCancelled=true in response

回答1:

By design, when an event is canceled, it is deleted from the calendar. So, there isn't a way today to query list of events that are deleted. We have an item in our backlog for supporting deleted events, but no timeline.



回答2:

I just tried

https://graph.microsoft.com/v1.0/Users/xx/Calendar/Events/xx/instances
?startDateTime=2020-02-17&endDateTime=2020-03-01&isCancelled=true

and what came back are all the non-cancelled events... Ditto isCancelled=false

leaving off the &isCancelled=xx parameter returns all the events with the isCancelled attribute set to false for everything.