SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

Problems when I try to call from API to give permissions to a sharepoint folder #9880

Open jm5pr opened 3 months ago

jm5pr commented 3 months ago

What type of issue is this?

Question

What SharePoint development model, framework, SDK or API is this about?

SharePoint REST API

Target SharePoint environment

SharePoint Online

What browser(s) / client(s) have you tested

Additional environment details

Issue description

We need to call the methods via API to grant permissions to a folder, but we are getting unauthorized errors in all of them. We have tried logging in with a user (we have ensured that the user is an admin of the site) and password, and via App, and we have the same problem with both. First, we tried to call to break the inheritance of the folder and we already get the unauthorized error: https://xxxxx.sharepoint.com/sites/Aplicaciones/_api/web/GetFolderByServerRelativeUrl(‘versiones/carpeta1’)/ListItemAllFields/breakroleinheritance(copyRoleAssignments=false, clearSubscopes=true) We have tried to do the same through a flow from PowerPlatform itself and we get the same permissions error, and if we try to share the link, we get the same error.

Can someone help us? Thank you very much

SabinaPL25 commented 3 months ago

Hello everyone, do we have an ETA for someone to get assigned?

goujah commented 1 month ago

Hello, i have the same issue, did you resolve it ?