pnp / PnP

SharePoint / Office 365 Developer Patterns and Practices - Archived older solutions. Please see https://aka.ms/m365pnp for updated guidance
https://aka.ms/m365pnp
Other
1.9k stars 3.31k forks source link

Inovke Secured Web API from remote event receiver #1866

Open rajeshpatil74 opened 5 years ago

rajeshpatil74 commented 5 years ago

I have a Remote Event Receiver developed/deployed for SharePoint online using hosted-addin. This add-in can be deployed in different sharepoint online enviroments. When item added event gets triggered another list gets updated.

To update the list with data, a WebAPI gets invoked which is secured using OAuth (registered in Azure). How i can invoke the WebAPI to get the needed data.

I am able to get the context of sharepoint to manage the list data and access token is also available. Can this token be passed somehow to get the API authericated and how ??

I guess the token available is for sharepoint and not for the webapi. How this can be made working??