0

I'm trying to retrieve list items that have unique role assignments from a list in SharePoint Online using Get-PnpListItem, is this possible?

Currently this property is empty when using Get-PnpListItem, I can iterate over the list items and use Get-PnpProperty to retrieve this property though I thought there might be a more efficient way.

I'm looking to get the same results as you would find from _layouts/15/uniqperm.aspx on a site.

0

By list item object, it means passing the Microsoft.SharePoint.Client.ListItem object. "HasUniqueRoleAssignments" can only return by "Get-PnPProperty".

I recommend you using Get-PnPProperty to retrieve permissions for items level: Retrieve Permissions at folder and file level in Powershell

  • Whilst that works I find it is much slower than doing the same thing in C# with CSOM, see example. I haven't been able to translate the lambda ctx.Load(listItems, a => a.IncludeWithDefaultProperties(b => b.HasUniqueRoleAssignments)) in PowerShell with the PnP cmdlets. – mheptinstall Mar 25 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.