I am developing a remote event receiver for our SharePoint Online developer website. I followed the following steps: –
1- As mentioned in this link https://derekgusoff.wordpress.com/2017/11/08/remote-event-receivers-youre-all-doing-it-wrong/, I have a new asp.net web application in VS created 2019 + I add a WFC service.
2- Within the service I added the following test code to update the item title as follows: –
public SPRemoteEventResult ProcessEvent(SPRemoteEventProperties properties)
SPRemoteEventResult result = new SPRemoteEventResult();
//if using App Only Context, use this method, and make sure ClientId and ClientSecret are specified in AppSettings
using (ClientContext context = Helpers.GetAppOnlyContext(siteUrl))
result.ChangedItemProperties.Add("Title", "After adding");
result.Status = SPRemoteEventServiceStatus.Continue;
3- I run the ngrok to debug the RER: –
Run ngrok command :- ngrok --http-header=rewrite 53938
4- I register the RER on the Dev Site @
5- I update the web.config with the generated clientId and clientsecret.
6- I add the RER with this command:
Add-PnPEventReceiver -List "12" -Name "TasksRER" -Url http://4f9922f3.ngrok.io/service1.svc -EventReceiverType ItemAdding -Synchronization Synchronous
7- I add the app permission with this url
https://***admin.sharepoint.com/_layouts/15/appinv.aspx, as follows:-
8- I run the VS project and the RER good work..
9- Now I wanted to provide the rer in azure >>, so I'm creating a new azure web app >> create a zip file for the project in vs >> and put the zip file in the azure web app with kudu drag / drop and ready I can access the service in Azure as follows:
10- I re-register the RER using the azure URL instead of the NGROK URL as follows:
Remove-PnPEventReceiver -List 12 -Identity TasksRER
Add-PnPEventReceiver -List "12" -Name "TasksRER" -Url https://****.azurewebsites.net/service1.svc -EventReceiverType ItemAdding -Synchronization Synchronous
but when I add a new article, nothing happens where the RER was not fired. So can anyone give advice on what the problem might be?