Skip to content

List.GetCheckedOutFiles API Returns Duplicate Site Path #10403

@gitpk-0

Description

@gitpk-0

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

Metadata

Metadata

Assignees

Labels

area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIsharepoint-developer-supportsharepoint-developer-supporttype:bug-confirmedConfirmed bug, not working as designed / expected.type:bug-suspectedSuspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions