Microsoft Graph APi 未返回 "Cancelled" 事件

Microsoft Graph APi not returning "Cancelled" Events

我正在尝试使用 Microsoft graph API 获取会议室日历中的所有事件,给定 startDateTime 和 endDateTime。我尝试了以下 API -

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

响应包括 isCancelled=false 的所有事件。如何获取已取消的事件?

&$filter=isCancelled%20eq%20true 也返回空,因为响应中没有 isCancelled=true 的事件

根据设计,当事件被取消时,它会从日历中删除。所以,今天没有办法查询已删除的事件列表。我们的积压工作中有一个项目用于支持已删除的事件,但没有时间表。

我刚试过

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

回来的都是未取消的活动…… 同上 isCancelled=false

离开 &isCancelled=xx 参数 returns 所有事件的 isCancelled 属性都设置为 false。

我试图在事件取消时收到通知后获取事件。我正在尝试使用通知资源 url 并抛出异常: Microsoft.Graph.ServiceException:代码:ErrorItemNotFound。 我期待的是带有未找到状态代码的响应,而不是抛出异常。

我的事件获取代码:

var request = new EventRequest(
                    $"{_graphClient.BaseUrl}/{notification.Resource}",
                    graphClientApp,
                    null);

                var message = await request.GetResponseAsync();

                var response = await message.GetResponseObjectAsync();