Hi,
I am developing a console application in which I have to attach a remote event receiver to a SharePoint online site. However, remote event receiver has been deployed using SharePoint provider hosted app on azure site, and it is up and running.
I am able to attach that RER to the site successfully through console app but RER is not triggering when I do any activity related to that event.
Refer below code for attaching the RER:
Site RootSite = clientContext.Site; clientContext.Load(RootSite, pSite => pSite.EventReceivers); clientContext.ExecuteQuery(); EventReceiverDefinitionCreationInformation eventReceiverInfo = new EventReceiverDefinitionCreationInformation(); eventReceiverInfo.EventType = EventReceiverType.WebProvisioned; eventReceiverInfo.ReceiverClass = "WebProvisionedEvent"; eventReceiverInfo.ReceiverName = "WebProvisionedEvent"; eventReceiverInfo.ReceiverUrl = "https://test.azurewebsites.net/Services/WebProvisionedEvent.svc"; eventReceiverInfo.SequenceNumber = 10001; eventReceiverInfo.ReceiverAssembly = AssemblyFullName; RootSite.EventReceivers.Add(eventReceiverInfo); clientContext.ExecuteQuery();
Any help would be appreciable...
Thanks,