如果我使用像这样的 List 事件实例 调用({{ccc}} 是 Postman 变量):
https://graph.microsoft.com/v1.0/users/{{UserID}}/calendar/events/{{RecurrEventID}}/instances?startDateTime={{start_datetime}} &endDateTime={{end_datetime}}
...我得到了日期范围内的all 事件。
要仅检索自定义事件(也称为异常),您可以将 OData 过滤器应用于查询:
$filter=type ne 'occurrence'
。但是,由于端点不返回已删除的事件,因此这些事件仍然不会显示。
对于已删除的事件,在 https://graph.microsoft.com/beta/users/{UserID}/calendar/events/{RecurrEventID} 端点上有
beta 记录的属性
cancelledOccurrences
和 exceptionOccurrences
。尽管它们至少自 2023 年 11 月起已使用 $select=*
在 v1.0 API 上返回,但它们仍未记录在案,并且在 最新 .NET SDK 中没有任何迹象。