You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the object $SPFolder.ListItemAllFields.HasUniqueRoleAssignments is retrievable and filled with a value, the object $SPFolder.ListItemAllFields.RoleAssignments is not and this error message is presented:
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
+ CategoryInfo : NotSpecified: (:) [format-default], CollectionNotInitializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
is there a change how you can retrieve folder permissions?
We are using an Azure function running PowerShell and using PnP in Version 2.4.0
In the past we were able to retrive the permissions with the Cmdlets:
$SPFolder = Get-PnPFolder -Url $subfolderServerRelativeURL
Get-PnPProperty -ClientObject ($SPFolder.ListItemAllFields) -Property HasUniqueRoleAssignments, RoleAssignments
Since the object $SPFolder.ListItemAllFields.HasUniqueRoleAssignments is retrievable and filled with a value, the object $SPFolder.ListItemAllFields.RoleAssignments is not and this error message is presented:
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
+ CategoryInfo : NotSpecified: (:) [format-default], CollectionNotInitializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand
Beta Was this translation helpful? Give feedback.
All reactions