-
Notifications
You must be signed in to change notification settings - Fork 262
Description
Describe the bug
We are encountering 2 issues when retrieving Events with GetAsDeltaGetResponseAsync and using a maxpagesize header.
-
When a recurring master event has a recurrence pattern that expands into more individual occurrences than the configured odata.maxpagesize, the server returns more items than the requested page size.
-
The @odata.nextLink returned points to a next page that, when fetched, contains duplicates of events already received. That next page in turn contains a nextLink which returns the same events again, producing an endless loop.
If maxpagesize is larger than the returned events for a master event including the individual occurrences, then there is no issue
Expected behavior
• The returned events should be less or equal to odata.maxpagesize
• @odata.nextLink must point to a subsequent page that contains only new, non-duplicated items. Pagination tokens should not cause previously-returned items to reappear.
How to reproduce
- Create or identify a recurring master event whose recurrence rule expands to more than the intended page size within your query time window (for example a yearly/daily rule with many occurrences).
- Request /users/{id}/calendarView/delta with StartDateTime, EndDateTime and header Prefer: odata.maxpagesize={N}.
- Inspect the first response:
- Count of returned items can be > N.
- A @odata.nextLink is present.
- GET the @odata.nextLink:
- Response contains items that were already included in the previous page (duplicates).
- A new @odata.nextLink is present and steps 3–4 repeat → infinite loop.
SDK Version
5.103.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_