Skip to content

Delta query + odata.maxpagesize on calendarView/delta returns more items than requested when a recurring master expands; odata.nextLink results in infinite pagination loop #3070

@DasekaX

Description

@DasekaX

Describe the bug

We are encountering 2 issues when retrieving Events with GetAsDeltaGetResponseAsync and using a maxpagesize header.

  1. 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.

  2. 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

  1. 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).
  2. Request /users/{id}/calendarView/delta with StartDateTime, EndDateTime and header Prefer: odata.maxpagesize={N}.
  3. Inspect the first response:
  • Count of returned items can be > N.
  • A @odata.nextLink is present.
  1. 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_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions