SharePoint / SharePoint/sp-dev-docs
List.GetCheckedOutFiles API Returns Duplicate Site Path
@Ashlesha-MSFT is already working on this.
Since Sep 18, 2025.
- 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
-
Upload a new file to any document library on a SharePoint Online site
-
Do NOT check in the file (leave it in checked-out state with no version)
-
Call the REST API endpoint:
https://tenant.sharepoint.com/sites/site-name/_api/web/lists/getbytitle('Shared Documents')/GetCheckedOutFiles -
Observe the
ServerRelativePath.DecodedUrlvalues 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
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.
Assessment
This issue has not been assessed yet.