Mar 04 2017 12:47 PM
Is there any feature on the CSOM API, or any other to check if an element (Site/Web/Folder) have child items with unique permission underneath it.
I dont want do a an expensive operation going deep into the childs, but I see the info exposed on the SP UI when you add/remove permissions
Any info?
Mar 05 2017 11:26 AM
ListItems, Lists and Sites all inherit from SecurableObject which has a property "HasUniqueRoleAssignments". As far as I know the only way for you to check if any of the child items of a SecurableObject has unique permissions applied is to pick a parent (List or Site) and loop through its children and for each one of them check the property.
Mar 05 2017 07:55 PM
Thanks Paul, I'm not sure, if it goes to all the childs. But I also found the following extension on the PnP-sites-core library. Ill check
GetAllUniqueRoleAssignments
Mar 05 2017 10:57 PM
@Raul Garita this function does:
Get all unique role assignments for a web object and all its descendents down to document or list item level.