SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

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

Open bramdejager opened 6 years ago

bramdejager commented 6 years ago

Category

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
AltruisticNerd commented 6 years ago

Confirmed. Note also that this should return files with no checked in version as in this interface: /_layouts/15/ManageCheckedOutFiles.aspx

yadavalli1 commented 4 years ago

Still an issue if its a large list

ianUsername commented 3 years ago

Any update on this?

JoeAlanis commented 3 months ago

Hi Folks, I am experiencing this issue. It doesn't seem to work on large doc libs