microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
calendarView/delta can loop forever with changing @odata.nextLink values but repeated identical page payloads
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
Describe the bug
We are seeing an infinite pagination loop on calendarView/delta for a recurrence-heavy mailbox.
The failure mode is:
- the first pages look normal
- a later page returns
@odata.nextLink - following that
@odata.nextLinkreturns the same page payload again - each repeated response contains a different
@odata.nextLink - no
@odata.deltaLinkis ever returned - this can continue indefinitely unless the client detects the loop and aborts
This is not a normal delta replay case where some entities reappear across pages. In our case, the full page payload repeats unchanged except for the @odata.nextLink value.
Endpoint
GET /v1.0/users/{mailbox}/calendarView/delta?startDateTime=...&endDateTime=...
We are using application permissions.
Impact
This blocks synchronization for the affected mailbox entirely.
Our worker would otherwise loop forever on the same delta session, so we had to add a guard that aborts when identical page payloads repeat across changing @odata.nextLink values.
Observed behavior
For one affected mailbox, we saw:
- page 1..N begin normally
- later pages start repeating the same event-id set
@odata.nextLinkchanges on every response- the event payload does not materially change
- no terminal
@odata.deltaLinkis returned
Example of our detection logic:
- page fingerprint is derived from the ordered event IDs in
value - repeated fingerprint observed on consecutive pages
nextLinkdigest changes, but payload fingerprint stays the same
Sanitized example from production logs:
- repeated page fingerprint:
204fb4a75e1f - repeats detected:
4 - current page when aborted:
5 - total items accumulated before abort:
1348
Expected behavior
One of the following should happen:
@odata.nextLinkshould advance to a new page with new items, eventually ending in@odata.deltaLink, or- the service should return a proper error response if the delta session cannot progress
It should not return an endless sequence of different @odata.nextLink values for the same page payload.
Reproduction pattern
We cannot share the affected tenant or mailbox, but the issue appears to correlate with:
calendarView/delta- a wide date range
- recurring events / recurrence-heavy calendars
In our environment, the request range is large enough to include future recurring instances.
We have also seen that changing Prefer: odata.maxpagesize=... can sometimes change whether the loop occurs, but not reliably. Smaller page sizes help in some cases and fail in others.
Request details
Sanitized request shape:
GET https://graph.microsoft.com/v1.0/users/{mailbox}/calendarView/delta?startDateTime={start}&endDateTime={end}
Authorization: Bearer {token}
Prefer: odata.maxpagesize=100
client-request-id: {guid}
Follow-up requests use the full opaque @odata.nextLink URL exactly as returned.
We do not parse or modify the skip token.
What we already verified
- We treat
@odata.nextLinkand@odata.deltaLinkas opaque and replay the exact returned URL. - We do not append extra query params after the initial request.
- We have independent detection for:
- repeated identical
nextLink - repeated identical page payloads across changing
nextLink
- repeated identical
- This is not just a duplicate entity appearing later in delta. It is the entire page repeating.
- We found other public reports that appear to describe the same issue:
Current workaround
Our current workaround is:
- detect repeated page payloads
- abort the delta session
- retry with a different
odata.maxpagesize - if that still fails, fall back to a full resync path on our side
This avoids an infinite loop, but it is only a mitigation and does not solve the underlying service behavior.
Questions
- Is this a known Microsoft Graph service issue for
calendarView/delta? - Is there a recommended server-supported workaround beyond changing
odata.maxpagesize? - Are there known constraints around recurrence expansion and wide
calendarViewwindows that should be documented? - Is there any additional request metadata Microsoft would like us to capture for escalation, beyond
client-request-id, timestamp, and full nextLink sequence?
Additional notes
We can provide, through a support channel if needed:
- exact timestamps
- sanitized sequences of
nextLinkdigests - sanitized page fingerprints
client-request-idvalues- correlation data from the failing session
We are intentionally omitting tenant IDs, mailbox addresses, access tokens, event subjects, and other customer-identifying data from this public report.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the calendarView/delta endpoint and the documented Microsoft Graph delta-query behavior. Reproduce the recurrence-heavy, wide-window request if possible, recording the full nextLink sequence and page fingerprints; the issue is done only when the service behavior is confirmed, documented, or routed with actionable escalation data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100