Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a sandbox solution for SharePoint 2013. (because it has to work in Office365) I have an eventreceiver that adds an item to a list. I don't want users to manually change that list, so I don't give them rights on that list. However the eventreceiver is executed with the users privileges. Giving the user no rigths to the list means the eventreceiver won't work, and run with elevated privileges is not allowed in the sandbox. What would be the best way to accomplish this scenario?

share|improve this question

1 Answer 1

I see this is an old one, not sure if it's still an issue. Using code in Sandbox solutions isn't supported in SP2013, so I would lean away from this as much as possible. Code in sandbox solutions is backward compatible to support SP2010 solutions, but it has been deprecated in SP2013.

With that said, even if you were going to keep the code, you can't elevate privileges in sandbox solutions. I think your best bet will be to look at possibly using a workflow instead. Workflows in SP2013 can be "elevated" to run under the workflow publishers identity, which may solve your issue.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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