Question

I need to break inheritance on a list item with a call to the API in my SPFX webpart. But if I do so with the connected user, he might not have the permission to do that.

Is there a way to configure the request to use other user than the connected one (a user with the proper permission).

No correct solution

OTHER TIPS

SharePoint Framework is a client side solution and it always runs in the context of the current user. So, there is no OOTB way to use elevated permissions with SPFx.

However, you can try some workarounds like Azure functions, Custom Web API, etc. as mentioned at: Options for elevating permissions in SharePoint Framework.

Sample using Custom Web API:

There is a one Sample SPFx webpart on GitHub which uses elevated privileges using Custom Web API.

Reference: Communicate using elevated privileges with SharePoint.

Sample using Azure Functions:

Running a SharePoint framework web part with elevated privileges.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top