-
Notifications
You must be signed in to change notification settings - Fork 233
Access denied while getting permissions for list item #654
Comments
Hey Denis, Looks like it's not a bug in the library, but something more related to SP API and Add-Ins. |
Thank you for quick response!
<d:GetUserEffectivePermissions m:type="SP.BasePermissions" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<d:High m:type="Edm.Int64">2147483647</d:High>
<d:Low m:type="Edm.Int64">4294967295</d:Low>
</d:GetUserEffectivePermissions>
<d:EffectiveBasePermissions m:type="SP.BasePermissions" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<d:High m:type="Edm.Int64">176</d:High>
<d:Low m:type="Edm.Int64">1006834415</d:Low>
</d:EffectiveBasePermissions>
|
I try to understand what values are correct and how to parse it in both cases. That is why I asked may be you already handle such situation in your library. Thank you! This question anyway not related to PnP library. |
pnp.sp.web.getCurrentUserEffectivePermissions().then(console.log); Requests for Though, not an issue to add. Actually, I did a PR. Next release planned date is 18th of December if I'm not wrong.
E.g. I have the same values: |
I found, that this behaviour can be reproduced only in add-in.
Thank you for PR! I've closed the issue, because it is not related to PnP. P.S. |
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version
[3.0.1]
Expected / Desired Behavior / Question
I'm trying to get item permissions for current user in SharePoint provider-hosted add-in. But sometimes (one or two time a week) I got access denied.
Steps to Reproduce
I have a SharePoint provider-hosted add-in installed in SharePoint Online. It has the following permissions:
I logged in under tenant administrator
To get current user permissions I do the following:
Request URL:
https://test-384cb0e2393687.sharepoint.com/sites/appCatalog/TestAddIn/_api/SP.AppContextSite(@target)/web/lists/getByTitle('Test%20Pages')/items(1)/getUserEffectivePermissions(@user)?@target=%27https%3A%2F%2Ftest.sharepoint.com%2Fsites%2Ftestsite%27&@user=%27i%3A0%23.f%7Cmembership%7Cadmin%40test.onmicrosoft.com%27
Response:
/getUserEffectivePermissions(@user)
with/EffectiveBasePermissions
in request URL it works.Thanks!
The text was updated successfully, but these errors were encountered: