• I writing JSOM code to get interact with sharepoint 2013 lists and document libraries.Now I have requirement to allow anonymous users to insert the items for SharePoint Lists list.

  • Can any one help me in knowing how can I use SPSecurity.CodeToRunElevated in JSOM Code


You can not use elevated privileges in Client Object Model. This would open up a huge security hole. You can use elevated privileges on SSOM, where are supposed that the deploy of a page or component has been approved by someone. Instead anyone could execute client code from anywhere and hack a site.

| improve this answer | |

No, you cannot elevate privileges in JavaScript CSOM, nor would you want to. Remember there is nothing stopping end users from crafting their own scripts and running them via a developer tool like IE's Developer Tools or Firebug. If you could elevate privileges via JavaScript, it could mean disaster on your Farm as regular users could just write a script to elevate their permissions and make some major changes.

If you need to do this from the browser, look at either a custom application page or a web service that could run on a server where you could properly elevate privileges.

You can refer this link for more information,


| improve this answer | |
  • Thanks for your support all and providing me important information. I am site administrator and I don't have any access to Web-application in Central administration. Can any one help me in knowing Is it possible to do with any other client side program – MSA Apr 19 '16 at 6:50

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