0

Idea is that inside an ItemAdded event receiver in a sandboxed solution (SharePoint Online) I want to set permissions on the item, which requires privileges that the user should not have on the list. I see that I cannot use SPSecurity.RunWithElevatedPrivileges inside sandbox.

As long as inside a SharePoint 2013 Workflow one has the App Step, there should be a way to run with elevated privileges inside an event receiver also, right?

2 Answers 2

0

Using SandBox solution this is not possible.

You should do this using a Workflow using AppStep.

1
  • I accepted Amal's answer as it literally answers my question, although I expect to see alternative solutions. I am testing now giving full permissions to the Workflow (as an app) and assigning permissions with REST calls. I update with my results. Apr 22, 2015 at 8:09
0

The cleanest way to solve this was in an Item Updated event receiver and with the workflow updating the item from an App Step.

Chose this because setting permissions in SharePoint Designer Workflow (2013) using REST takes too many steps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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