I am trying to retrieve
HasUniqueRoleAssignements property for multiple SharePoint Online lists using Powershell.
I can do it for each one in SharePoint on-premises:
but the same cmdlet applied for SPO tenant returns an error:
Cannot find an overload for "Load" and the argument count: "1".
At C:\Users\Me\Documents\Customer.ps1:34 char:3
+ $ctx.Load($ll.HasUniqueRoleAssignments) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) , MethodException
+ FullyQualifiedErrorId : MethodCountCouldNotFindBest
If I don't load the property, it will not be displayed as it needs to be separately requested.
I can access Fields of a list, but fields are columns and not properties.
The property can be loaded and accessed without issue using C#:
ctx.Load(ctx.Web.Lists, wc => wc.Include(w => w.HasUniqueRoleAssignments));
I also tried
$list.Retrieve() which should retrieve the properties and IntelliSense but it didn't recognize the
HasUniqueRoleAssignments (mind you, it doesn't even suggest
That begs the questions:
Is it possible that using CSOM I would be able to access one property with C# and not with Powershell? Where can I find a list of PS accessible properties?
Can I use Expression like in C# example to load the properties for all the lists or do I need to do that one by one?