Here let us look at the working with SharePoint site
permissions using the PnP JavaScript library. Some of the basic operations like
retrieve available permissions, add or remove the user permissions from the
site will be explained.
Note:
- PnP JavaScript Core Library is supported on SharePoint 2013, SharePoint 2016 and SharePoint Online versions.
- The prerequisites for the operations are es6-promise.js, fetch.js, pnp.js or pnp.min.js.
The following sample shows us retrieving all user
permissions of the SharePoint site along with the user roles using PnP
JavaScript Core library.