HI Team,
I was wondering is there any way to call azure function from Sharepoint SPItemEventReceiver.ItemAdded Event handler or any other way to consume azure functions in SharePoint event handler?
HI Team,
I was wondering is there any way to call azure function from Sharepoint SPItemEventReceiver.ItemAdded Event handler or any other way to consume azure functions in SharePoint event handler?
Hello @JAPNAMSINGH-6684,
I'm not sure of all the features on the Sharepoint side but if it lets you use HttpClient (in the SPItemEventReceiver.ItemAdded event handler) and invoke an HTTP endpoint, you can a corresponding Function App with an HTTP trigger, and the entire thing should work. It seems to have been done before with Sharepoint Online, in example: SharePoint Remote Event Receivers using Azure Function
Another approach is to use Logic Apps workflow and it might be quicker & simpler to manage:
Sharepoint Connector has a dozen triggers, one of which is When an item is created.
Assuming that the event you want is provided by the SP connector, you can then call your function app using the Azure Functions connector.
I hope this helps you to get started, let me know if you have any further questions.
Hi @JAPNAMSINGH-6684 - Just checking in here, were you able to implement this successfully?
@MikeUrnun Yes, I was able to use httpClient way to consume azure functions. Thanks for your help
If Mike's answer helps you, you could accept it as answer:)
It would be helpful to others who have similar issues in the future.
8 people are following this question.