A user fills a form in a spfx webpart. Correspondingly I have to create an item in a list for this Metadata. What I would like to do is achieve this, but restrict the user from directly accessing/modifying items within the same list. But in client side web parts, code is able to do what user is able to do. Any suggestions how I could achieve impersonation and modify the list without providing user with the access to the list?


"Both SharePoint Framework Extensions and user custom action or ECB menu item solutions run in the browser and can contain only client-side JavaScript code. Client-side solutions have a number of limitations, such as not being able to elevate permissions in SharePoint or reach out to external APIs that don't support cross-origin communication (CORS) or authentication using OAuth implicit flow. In such cases, the client-side solution could leverage a remote server-side API to perform the necessary operation and return the results to the client."

Check Use only client-side code part.

  • Lee can't we call a workflow or an Addin from the client side code to achieve this? – mohd tahir Dec 28 '17 at 4:20
  • You may use add-in part(can be insert to modern page), so you could elevate permission in add-in. – Lee_MSFT Dec 28 '17 at 5:42
  • So will the client side code in Spfx will communicate with the app part present on the modern page? – mohd tahir Dec 28 '17 at 5:52
  • 1
    I mean use add-in part instead of SPFx, PatMill_MSFT mentioned another approach by creating Azure App, while it's more complex solution. sharepoint.stackexchange.com/questions/194793/… – Lee_MSFT Dec 28 '17 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.