-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting list items with LoadListDataAsStreamAsync with CAML query won't allow to request RoleAssignments #607
Comments
Thanks for using @pxmonti and providing feedback. For now this indeed is the case, I'll do some more research to understand if somehow the LoadItemsByCamlQuery approach can return the "system" fields...if not then I'm considering adding a another data load option that under the covers uses the CSOM endpoint. |
Thank you @jansenbe. For the time being I'll stick with the current CSOM approach and wait for news from your side. |
That makes sense @pxmonti. I'll add a new issue to track the need |
@pxmonti : can you share the CSOM snippet you're using today? Will help with ensuring we verify your use case. |
Sure, this is what I currently do with CSOM: ``
`` |
Adding some research notes here: using $select and $expand kind of works in combination with the
Implementation proposal:
Sample Body: {
"query": {
"__metadata": {
"type": "SP.CamlQuery"
},
"ViewXml": "<View><ViewFields><FieldRef Name='Title' /><FieldRef Name='FileDirRef' /><FieldRef Name='File_x0020_Type' /></ViewFields><OrderBy Override='TRUE'><FieldRef Name= 'ID' Ascending= 'FALSE' /></OrderBy></View>",
"DatesInUtc": true
}
} Results in an expanded {
"d": {
"results": [
{
"__metadata": {
"id": "3d5d7814-a5c7-4f66-9505-ba9f7bad0c41",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)",
"etag": "\"107\"",
"type": "SP.Data.FieldTypesListItem"
},
"FirstUniqueAncestorSecurableObject": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FirstUniqueAncestorSecurableObject"
}
},
"RoleAssignments": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)/RoleDefinitionBindings"
}
},
"PrincipalId": 3
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)/RoleDefinitionBindings"
}
},
"PrincipalId": 4
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)/RoleDefinitionBindings"
}
},
"PrincipalId": 5
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)/RoleDefinitionBindings"
}
},
"PrincipalId": 6
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)/RoleDefinitionBindings"
}
},
"PrincipalId": 16
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)/RoleDefinitionBindings"
}
},
"PrincipalId": 44
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)",
"type": "SP.RoleAssignment"
},
"Member": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)/Member"
}
},
"RoleDefinitionBindings": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)/RoleDefinitionBindings"
}
},
"PrincipalId": 47
}
]
},
"AttachmentFiles": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/AttachmentFiles"
}
},
"ContentType": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/ContentType"
}
},
"GetDlpPolicyTip": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/GetDlpPolicyTip"
}
},
"FieldValuesAsHtml": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesAsHtml"
}
},
"FieldValuesAsText": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesAsText"
}
},
"FieldValuesForEdit": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesForEdit"
}
},
"File": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/File"
}
},
"Folder": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Folder"
}
},
"LikedByInformation": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/LikedByInformation"
}
},
"ParentList": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/ParentList"
}
},
"Properties": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Properties"
}
},
"Versions": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Versions"
}
},
"HasUniqueRoleAssignments": false,
"FileSystemObjectType": 0,
"Id": 1,
"ServerRedirectedEmbedUri": null,
"ServerRedirectedEmbedUrl": "",
"Title": "item updated",
"FileDirRef": "/sites/prov-1/Lists/FieldTypes",
"File_x0020_Type": null,
"ID": 1,
"Created": "2020-11-10T15:39:12Z",
"Modified": "2021-10-26T07:16:02Z"
}
]
}
} Sample that also further expands
Results in: {
"d": {
"results": [
{
"__metadata": {
"id": "7100a7ee-f6ed-4176-aefb-5d9522c971d9",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)",
"etag": "\"107\"",
"type": "SP.Data.FieldTypesListItem"
},
"FirstUniqueAncestorSecurableObject": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FirstUniqueAncestorSecurableObject"
}
},
"RoleAssignments": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(3)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741829)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741829)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "2147483647",
"Low": "4294967295"
},
"Description": "Has full control.",
"Hidden": false,
"Id": 1073741829,
"Name": "Full Control",
"Order": 1,
"RoleTypeKind": 5
}
]
},
"PrincipalId": 3
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(4)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741826)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741826)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "176",
"Low": "138612833"
},
"Description": "Can view pages and list items and download documents.",
"Hidden": false,
"Id": 1073741826,
"Name": "Read",
"Order": 128,
"RoleTypeKind": 2
}
]
},
"PrincipalId": 4
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(5)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741830)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741830)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "432",
"Low": "1011030767"
},
"Description": "Can add, edit and delete lists; can view, add, update and delete list items and documents.",
"Hidden": false,
"Id": 1073741830,
"Name": "Edit",
"Order": 48,
"RoleTypeKind": 6
}
]
},
"PrincipalId": 5
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(6)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741825)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741825)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "48",
"Low": "134287360"
},
"Description": "Can view specific lists, document libraries, list items, folders, or documents when given permissions.",
"Hidden": true,
"Id": 1073741825,
"Name": "Limited Access",
"Order": 160,
"RoleTypeKind": 1
}
]
},
"PrincipalId": 6
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(16)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741825)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741825)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "48",
"Low": "134287360"
},
"Description": "Can view specific lists, document libraries, list items, folders, or documents when given permissions.",
"Hidden": true,
"Id": 1073741825,
"Name": "Limited Access",
"Order": 160,
"RoleTypeKind": 1
}
]
},
"PrincipalId": 16
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(44)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741829)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741829)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "2147483647",
"Low": "4294967295"
},
"Description": "Has full control.",
"Hidden": false,
"Id": 1073741829,
"Name": "Full Control",
"Order": 1,
"RoleTypeKind": 5
}
]
},
"PrincipalId": 44
},
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/RoleAssignments/GetByPrincipalId(47)",
"type": "SP.RoleAssignment"
},
"RoleDefinitionBindings": {
"results": [
{
"__metadata": {
"id": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741833)",
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/RoleDefinitions(1073741833)",
"type": "SP.RoleDefinition"
},
"BasePermissions": {
"__metadata": {
"type": "SP.BasePermissions"
},
"High": "560",
"Low": "134221824"
},
"Description": "Can only view the web when given permissions.",
"Hidden": true,
"Id": 1073741833,
"Name": "Web-Only Limited Access",
"Order": 176,
"RoleTypeKind": 9
}
]
},
"PrincipalId": 47
}
]
},
"AttachmentFiles": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/AttachmentFiles"
}
},
"ContentType": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/ContentType"
}
},
"GetDlpPolicyTip": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/GetDlpPolicyTip"
}
},
"FieldValuesAsHtml": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesAsHtml"
}
},
"FieldValuesAsText": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesAsText"
}
},
"FieldValuesForEdit": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/FieldValuesForEdit"
}
},
"File": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/File"
}
},
"Folder": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Folder"
}
},
"LikedByInformation": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/LikedByInformation"
}
},
"ParentList": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/ParentList"
}
},
"Properties": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Properties"
}
},
"Versions": {
"__deferred": {
"uri": "https://bertonline.sharepoint.com/sites/prov-1/_api/Web/Lists(guid'7d644d41-d86e-4594-99de-479594a68fd9')/Items(1)/Versions"
}
},
"HasUniqueRoleAssignments": false,
"FileSystemObjectType": 0,
"Id": 1,
"ServerRedirectedEmbedUri": null,
"ServerRedirectedEmbedUrl": "",
"Title": "item updated",
"FileDirRef": "/sites/prov-1/Lists/FieldTypes",
"File_x0020_Type": null,
"Number": 123456,
"ID": 1,
"Created": "2020-11-10T15:39:12Z",
"Modified": "2021-10-26T07:16:02Z"
}
]
}
} |
@pxmonti : what you need is possible using REST (see above)...I'll work on implementing this in the coming days. |
Thank you @jansenbe , I'll wait for the implementation.
Scarica Outlook per Android<https://aka.ms/AAb9ysg>
…________________________________
From: Bert Jansen ***@***.***>
Sent: Sunday, October 31, 2021 6:28:52 PM
To: pnp/pnpcore ***@***.***>
Cc: Paolo ***@***.***>; Mention ***@***.***>
Subject: Re: [pnp/pnpcore] Getting list items with LoadListDataAsStreamAsync with CAML query won't allow to request RoleAssignments (Issue #607)
@pxmonti<https://github.com/pxmonti> : what you need is possible using REST (see above)...I'll work on implementing this in the coming days.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#607 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABA2O4CDPJO65JHFKM6FDOTUJV4FJANCNFSM5HCB26UQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@pxmonti : I've just pushed a fix for this (see 3468711). With tomorrow's nightly build you should be able to mimic your CSOM scenario. Updated docs will come to https://pnp.github.io/pnpcore/using-the-sdk/listitems-intro.html |
This is great news! Thank you @jansenbe !! |
@pxmonti : yes, just add the system fields as FieldRef's in your CAML query. The code will analyze the CAML XML and ensure the needed fields are added into the $select. Checkout https://pnp.github.io/pnpcore/using-the-sdk/listitems-intro.html#using-paging-with-loaditemsbycamlquery for a sample. Note the highlighted parts: |
Awesome! I'll install the next nightly build package and test in in my code! |
Hi @jansenbe , I've tested the 1.4.34-nightly build and I see that it is 99% working as I was expecting. What is the correct way of extracting the "File_x0020_Size" field? |
@pxmonti : You've to possible solutions. The red one uses the See also the updated paging sample in our docs: https://pnp.github.io/pnpcore/using-the-sdk/listitems-intro.html#using-paging-with-loaditemsbycamlquery |
Hi @jansenbe , I tested the 2 approaches proposed. I am using 1.4.34-nightly build. |
@pxmonti : you need to add a using statement: "using PnP.Core.Model;" before you can use "QueryProperties" |
If all is good, then feel free to close this issue |
Hello all, I need to load all items from lists/libraries with potentially a large number of items and for this I thought I'd use a CAML query approach to extract only the fields I need and use RowLimit for pagination. Since I need also system fields like FieldRef and File_x0020_Size, I cannot use LoadItemsByCamlQueryAsync, because as per documentation this method won't return those.
LoadListDataAsStreamAsync would solve this, however I also need to fetch the RoleAssigments collection for every item, but this method won't return it (I checked that LoadItemsByCamlQueryAsync would return RoleAssigments correctly loaded instead).
So, basically looks like there's no way as of now (that I am awar of) to query items using a CAML query and have system fields fetched and have RoleAssigment fetched all with a single call.
I was able to do so with the old CSOM approach, so I was expecting I could do this with PnP.Core SDK too.
Is there a way to get to the result I'm trying to achieve?
Thank you
The text was updated successfully, but these errors were encountered: