Reputation: 85
I try to get all items from a SharePoint library, regardless of its status (checkin/out). Why does my code don't get the checked out items/documents
graphClient.Sites["SITEID"].Lists["LISTID"].Items.Request().Expand("createdByUser,fields,driveItem").GetAsync().Result;
Edit:
Upvotes: 1
Views: 599
Reputation: 20595
driveItem
resource has publication
property which provides information about the published or checked-out state of an item, in locations that support such actions.
This property is not returned by default.
You have to add $select
statement to driveItem
in Expand
method.
graphClient.Sites["SITEID"]
.Lists["LISTID"]
.Items
.Request()
.Expand("createdByUser,fields,driveItem($select=publication)")
.GetAsync().Result;
PublicationFacet
has property level
which describes the state of publication for document. Either published
or checkout
.
Resources:
Upvotes: 2