SharePoint On-Premises Event Receiver migration to SharePoint Online

Copper Contributor

Hello, There is a requirement to migrate SharePoint On-Premises sites to SharePoint Online (SPO). Some of the customization in the current 2013 on-prem site include Event Receivers specially ItemDeleting synchronous event. I was checking out SharePoint Webhooks but looks like sync (ing) events are not supported.

Do we have any other option to move Event Receiver in SPO Modern experience specially synchronous events?

Thank you.

2 Replies

@rjspdev Yes, SharePoint web hooks don't support sync events.


Check if Remove Event receivers in SharePoint online helps.

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

We start using Remote Event Receivers + Azure Functions a few years ago to check and block ItemDeleting events. It was tricky to get the response right, but it works quite well.


In a nutshell, it is:
1. Provide something which can handle HTTP POST from SPO (e.g. an Azure Function)
2. Use Add-PnPEventReceiver and point to the URL of (1)


Depending on what your Event Receiver should do, it might be necessary to access SP from your code -> CSOM or Graph API. When using *ing events, it is important to return the correct response. Here's a snippet to give you an idea of the response:

string responseString =
                $"<s:Envelope xmlns:s=\"\"><s:Body>" +
                $"<ProcessEventResponse xmlns=\"\">" +
                $"<ProcessEventResult xmlns:i=\"\">" +
                $"<ChangedItemProperties xmlns:a=\"\">" +
                $"</ChangedItemProperties>" +
                $"<ErrorMessage>{this.ErrorMessage ?? string.Empty}</ErrorMessage>" +
                $"<RedirectUrl>{this.RedirectUrl ?? string.Empty}</RedirectUrl>" +
                $"<Status>CancelWithError</Status>" +


This articles might help too: