Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SharePoint Access Denied on getUserEffectivePermissions Rest Call


SharePoint Rest API expose a method to check Permission on a specific securable object (e.g. a list item).

https://zsis.sharepoint.com/sites/mysite/_api/web/lists/getByTitle('mylist')/items(98)/getUserEffectivePermissions(@user)?@user=%27i%3A0%23.f%7Cmembership%7Cmario.rossi%40zsis.it%27

Gets the effective permissions that a specified user has on the list item.
https://docs.microsoft.com/en-us/previous-versions/office/sharepoint-csom/jj862521(v=office.15)

In some cases, this call returns an Access Denied response and users are not be able to check this value.
It depends by the permission level which the current user (the user who perform the call, not the user passed as parameter) has on this specific items.

To check securable object permissions, the permission level must have the Enumerate Permissions  permission.
Enumerate Permissions  -  Enumerate permissions on the Web site, list, folder, document, or list item.



By default, the only permission level with this capability is the Full Controlpermission level.

Then, if I need that my Contribute or Read permission level perform this call, I can easily change the permission level by checking the Enumerate Permissionspermission inside the right permission level.

In my case, I added this capability to the Contribute permission level.





This post first appeared on ZSvipullo, please read the originial post: here

Share the post

SharePoint Access Denied on getUserEffectivePermissions Rest Call

×

Subscribe to Zsvipullo

Get updates delivered right to your inbox!

Thank you for your subscription

×