SharePoint / SharePoint/sp-dev-docs

List.GetCheckedOutFiles API Returns Duplicate Site Path

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

@Ashlesha-MSFT is already working on this.

Since Sep 18, 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

Windows

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

No response

Describe the bug / error

The GetCheckedOutFiles() API method returns incorrect ServerRelativePath values with duplicated site paths for checked-out files.

The API returns a malformed path with the site segment duplicated:

<d:DecodedUrl>/sites/site-name/sites/site-name/Shared Documents/example-file.png</d:DecodedUrl>

The site path /sites/site-name appears twice consecutively, making the path invalid and unusable without manual correction.

Steps to reproduce
  1. Upload a new file to any document library on a SharePoint Online site

  2. Do NOT check in the file (leave it in checked-out state with no version)

  3. Call the REST API endpoint:
    https://tenant.sharepoint.com/sites/site-name/_api/web/lists/getbytitle('Shared Documents')/GetCheckedOutFiles

  4. Observe the ServerRelativePath.DecodedUrl values contain duplicate site paths

Expected behavior

For files with no checked-in version, the API should return the correct server-relative path:

<d:DecodedUrl>/sites/site-name/Shared Documents/example-file.png</d:DecodedUrl>

This path should be directly usable for:

  • Constructing file URLs
  • Making subsequent API calls
  • Path-based file operations

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.