2

I'm trying to add users through the REST API, but I'm getting an authentication error.

The endpoint I'm posting the new user to is <sp_url>/_api/web/siteusers, using the pnp-js-core library. I get a 401, although my user has all privilages, except for admin privilages.

This answer mentions the fact that admin privilages resolve the issue. However, I would rather not give admin rights to every user that needs to add other users. I think it should be possible to add people through the REST API without admin privilages, as I can add users through the normal sharepoint web interface.

How can I add users through the REST API without giving the user admin privilages?

1
  • Yes, agreed to Ram answer, minimum Manage Permission is required in order to add/remove users from Site. – ThinkB4Code Nov 28 '17 at 9:56
1

If admin permissions cannot be given, at least 'ManagePermissions' rights are required to assign permissions to users.

Ref : https://msdn.microsoft.com/library/Microsoft.SharePoint.SPBasePermissions.aspx

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.