SharePoint / sp-dev-docs

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

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

Open jm5pr opened 1 month ago

jm5pr commented 1 month 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 4 weeks ago

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