My site is in Office 365. I've one document library, from which I want to get item level permission of particular item. To do this, I have made rest call on particular items of document which is as follow:
https://xxx/yyy/_api/web/GetFileByServerRelativeUrl('/sites/xxx/yyy/Documents/fb.png')?$expand=ListItemAllFields/RoleAssignments/Member,ListItemAllFields/RoleAssignments/RoleDefinitionBindings,ListItemAllFields/RoleAssignments/Member/Users
Now when I'm opening the item level permission from list (OOB), it shows me all the permissions of particular item but using rest call I'm getting following error:
Access denied. You do not have permission to perform this action or access this resource.
My user has Full control permission on list. The rest call returns me only result if I add user name in Site Collection Admin.