Element level permissions: is there a GET equivalent to Set-PnPListItemPermission?

You can do it using the default Get-PnPListItem

Get-PnPListItem -List Tasks -Id 1

Once you have obtained an object of type Microsoft.SharePoint.Client.ListItem

This object has RoleAssignments properties that will provide you with a collection of RoleAssignment objects. This object will have collections of users that have permission on this element. You can use the RoleAssignment.Member property to obtain real user details of the Principal type.

You can refer to the following code example on how to loop through the loop RoleAssigments and gain access to users. This is not an exact code, but it will give you an idea of ​​how to recover these properties.

$ file = Get-PnPListItem -List Tasks -Id 1
Get-PnPProperty -ClientObject $ file -Property HasUniqueRoleAssignments, RoleAssignments

if ($ file.HasUniqueRoleAssignments -eq $ True)
{
foreach ($ roleAssignments in $ file.RoleAssignments)
{
Get-PnPProperty -ClientObject $ roleAssignments -Property RoleDefinitionBindings, Member

$ permission.LoginName = $ roleAssignments.Member.LoginName
$ permission.LoginTitle = $ roleAssignments.Member.Title
$ permission.PrincipalType = $ roleAssignments.Member.PrincipalType.ToString ()
$ permission.Permission = ""
# Obtain the permissions assigned to the user
foreach ($ RoleDefinition in $ roleAssignments.RoleDefinitionBindings)
{
$ permission.Permission = $ permission.Permission + "," + $ RoleDefinition.Name
}
}
}

You can also use the REST API.

"/ _api / web / lists / getbytitle (& # 39; Test & # 39;) /
elements (1)? $ expand = RoleAssignments / Member / Users "