-
Notifications
You must be signed in to change notification settings - Fork 1k
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.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