04-03-2018 11:13 AM
04-03-2018 11:13 AM
Can someone confirm my findings, possible issue with the new CSOM (March release) and CheckedOutFiles() method? It is always returning 0 items.
Expected or Desired Behavior
When requesting the Checked Out Files in the new CSOM 16.1.7521.1200 I don't get any results back. 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.
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
Expected output: 1
SharePoint Client Browser (C#)
Below a screenshot of a preview version of the SPCB which retrieves the files via CheckedOutFiles(). The count is 0 (see #1). Even though the library contains 1 file which is checked out (see #2).
04-03-2018 11:49 AM
Hi Bram, I quickly wrote a console app and I can confirm this behavior: always returning 0 here too...
04-11-2018 02:45 AM
This change is currently rolling out in the server side, so there might be some delays for the APIs to work like also noted in the CSOM release blog post. We need to get things out before we can enable the APIs.
If the issue still exists within upcoming week(s), we need to have a closer look on this and would suggest submitting an issue at http://aka.ms/spdev-issues, so that we can trace that using our official process.
04-11-2018 05:06 AM
Thanks for the response. I'll keep monitoring the feature and see if it starts working in upcoming weeks. The SharePoint Client Browser is ready for checked out files, check out the latest release for SharePoint Online.
Keep you posted on updates when it starts working ;)
06-11-2018 06:34 AM
09-28-2018 04:20 AM
Hi Paul, it's been a while. But what is your experience now? It looks I still have the same behavior.