Is it possible to have for a List SPItemEventReceiver in a Low Trust Provider Hosted App?

89 Views Asked by At

i have a Provider Hosted App which runs in Low Trust Mode. I have two lists (one for the main items and another one as archive for deleted items). I want to know if and how it is possible to have like in full trust solutions a list a SPItemEventReceiver which can do something on adding or deleting in app context.

For example:

A user deletes an item in the list and normally he has no contribute permissions on the archive list. I want to execute the code in apps context with higher privileges and copy the item from one to another list. After successfull copying delete it on one side.

  • Is it generally possible to have such an SPItemEventReceiver within an Provider Hosted App which runs in Low Trust Mode
  • if yes, where to start?
  • is it also possible to execute code in apps context with higher privileges?

best regards

Bog

1

There are 1 best solutions below

0
On BEST ANSWER

Yes you can do it in Provider Hosted app(Remote event receivers - CSOM) using the AppOnlycontext and also you can do it in ListItem Event Receivers using "Item Deleting" event.

SP Event Receivers - On premises

Remote Event Receivers CSOM