You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

调用Microsoft Graph API CalendarView delta时如何屏蔽重复事件实例?

Fix: Get Only Recurring Event Masters & Exceptions in Calendar Delta Queries

I’ve run into this exact issue with endless recurring event instances cluttering delta results—total pain. Here’s the straightforward solution to get only the changes you care about:


1. Use the type Field to Filter Out Regular Instances

Every event in the Graph API has a type property that categorizes recurrence-related items:

  • seriesMaster: The parent event that defines the entire recurring series (you want this)
  • occurrence: A standard, unmodified instance of the series (you want to exclude this)
  • exception: A modified instance of the series (e.g., a single meeting moved—you want this)

Add a $filter parameter to your delta query to exclude regular occurrences:

GET /me/calendar/delta?$filter=type ne 'occurrence'

2. What This Does for You

  • When the core recurring series is updated (like changing the recurrence pattern or meeting title), the seriesMaster event will appear in your delta results—alerting you that the entire series has changed.
  • Any exceptions to the series (modified instances) will show up as exception events, so you won’t miss those one-off changes.
  • All the redundant, unmodified occurrence instances get stripped out entirely, cleaning up your results.

3. Optional: Trim Payload with $select

To make your responses even leaner, add a $select parameter to only fetch the fields your application needs:

GET /me/calendar/delta?$filter=type ne 'occurrence'&$select=id,subject,type,recurrence,start,end

Quick Checks

  • Ensure you’re using Graph API v1.0 (or beta for testing) — the type filter is supported in both, but v1.0 is best for production.
  • If you’re paginating through delta results, apply the same $filter to every page request to keep the filter active.

内容的提问来源于stack exchange,提问作者Judith Ting

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 06:34:13