Skip to content

CSOM: CheckedOutFiles() on a List is not working #2664

@bramdejager

Description

@bramdejager

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

When requesting the Checked Out Files in the CSOM 16.1.7521.1200 I don't get any results back (this was back in April 2018). I did validation of this again with CSOM 16.1.8029.1200 and is still not working for me and Paul Pasha. See thread. Eventhough I'm site collection admin on the site collection and within the document library where I request the files I have one checked out file.

Observed Behavior

I would expected the method Microsoft.SharePoint.Client.List.GetCheckedOutFiles() to return the checked out files. In this case, one file.

Steps to Reproduce

I used both the following PowerShell script, and C# to retrieve the checked out files.

$siteUrl = "https://m365x123456.sharepoint.com/sites/vendors"

$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($siteUrl)
$ctx.AuthenticationMode = [Microsoft.SharePoint.Client.ClientAuthenticationMode]::Default
$ctx.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($loginname, $pwd)

$web = $ctx.Web 
$ctx.Load($web) 
$ctx.ExecuteQuery()

$list = $web.GetList("/sites/vendors/Shared Documents")
$ctx.Load($list)
$ctx.ExecuteQuery()

$list.Title

$files = $list.GetCheckedOutFiles()
$ctx.Load($files)
$ctx.ExecuteQuery()

$files.Count

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:csom/rest/apiCategory: SharePoint Client Side Object Model SDK / REST APIstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active worktype:bug-confirmedConfirmed bug, not working as designed / expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions