SharePoint / SharePoint/sp-dev-docs

The Sharepoint list getChanges API does not throw exception for expired changeToken.

Open
#10,389 5 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Sep 3, 2025.

area:csom/rest/api sharepoint-developer-support type:bug-confirmed type:bug-suspected
Dominant language
PowerShell
Stars
1.4k
Forks
1.1k
Avg merge
4d 12h
Merged PRs (30d)
12

Description

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Developer environment

Linux

What browser(s) / client(s) have you tested
  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)
Additional environment details

Using the SharePoint API with curl in a UNIX environment

Describe the bug / error

According to the SharePoint Change Log documentation, the change log may be rotated after 60 days.
Additionally, the SharePoint getChanges API documentation states that the API should return an SPInvalidChangeTokenException if the token is invalid.

In our recent testing, when using a changeToken generated more than 60 days ago, the API neither returned changes/events older than 60 days nor threw the expected SPInvalidChangeTokenException.

If this is expected behavior, it implies that some changes/events may be missed when relying on this API to retrieve changes.

Steps to reproduce
  1. Collect changeToken from a getChanges API response 60 days ago.
  2. During this period, several list item changes occurred on the same list.
  3. When calling getChanges API again with this changeToken, the API neither returned the changes from 60 days ago nor threw an exception.
Expected behavior

When calling getChanges API with expired changeToken, the API should throw an exception: SPInvalidChangeTokenException.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.