How a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?
While RWEP is applicable in Server side code how a CSOM or JSOM code gets permission to do Add/Edit/Update operation on list?
August 22nd, 2015 12:01pm

Assuming RWEP is RunWithElevatedPrivileges...

CSOM (Managed or JS) accesses SharePoint via the REST web services and only has the permissions of the caller. There is no RunWithElevatedPrivileges for code not running from the server side API. Although, the app can have greater permissions than the user. (See the links below.)

CSOM (Managed or JS) gets permissions:

  • From the logged in user (SharePoint Hosted app or something running on the SP server.)
  • App permissions (when running as an app)

To better answer your question:

  • How / where is your CSOM running?
  • Is the list in the app site, or elsewhere in SharePoint?
  • Does the user running the code already have Add/Edit/Update permissions?

By the way, when searching MSDN, SharePoint apps are now "SharePoint Add-ins".

https://technet.microsoft.com/en-us/library/jj219576.aspx

http://blogs.msdn.com/b/officeapps/archive/2013/09/25/use-sharepoint-permission-management-to-create-various-roles-in-an-app-for-sharepoint.aspx

https://msdn.microsoft.com/en-us/library/office/fp142383.aspx

Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2015 4:16pm

Assuming RWEP is RunWithElevatedPrivileges...

CSOM (Managed or JS) accesses SharePoint via the REST web services and only has the permissions of the caller. There is no RunWithElevatedPrivileges for code not running from the server side API. Although, the app can have greater permissions than the user. (See the links below.)

CSOM (Managed or JS) gets permissions:

  • From the logged in user (SharePoint Hosted app or something running on the SP server.)
  • App permissions (when running as an app)

To better answer your question:

  • How / where is your CSOM running?
  • Is the list in the app site, or elsewhere in SharePoint?
  • Does the user running the code already have Add/Edit/Update permissions?

By the way, when searching MSDN, SharePoint apps are now "SharePoint Add-ins".

https://technet.microsoft.com/en-us/library/jj219576.aspx

http://blogs.msdn.com/b/officeapps/archive/2013/09/25/use-sharepoint-permission-management-to-create-various-roles-in-an-app-for-sharepoint.aspx

https://msdn.microsoft.com/en-us/library/office/fp142383.aspx

August 23rd, 2015 1:11am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics