Hi,
I need to attach Remote Event Receivers to a SharePoint List. I have got the OAuth token for my SharePoint tenant using admin credential. Then I have used below REST call to add Remote Event Receivers to attach Event Receivers to a SharePoint List. It attaches the Remote event receiver successfully, But if I do activity on that list then event doesn't gets generated.
POST https://<mydomain>.sharepoint.com/sites/test1/_api/web/Eventreceivers HTTP/1.1 Content-Type: application/json;odata=verbose Accept: application/json Authorization: Bearer <OAuth token for my SharePoint tenant> {"__metadata":{"type":"SP.EventReceiverDefinition"},"ReceiverName":"FileAdded","Synchronization":2,"EventType":10001,"ReceiverUrl":"https://<myreceiverappdomain>/Services/AppEventReceiver.svc"}
If I get the token from a SharePoint app, which in turn gets the app from ACS. and use that token to attach Remote EventReceivers then everything works fine. Events getting generated to my receiver end point.
I just have OAuth token for my SharePoint tenant, How to use that to attach Remote Event receivers to my SharePoint lists.
Thanks,
Abhi