I have an Azure Functions App (with HTTP API endpoint) which, upon triggered, needs to know the EMAIL ADDRESS of the caller; calling via the client-side (SPFx) JavaScript on the SharePoint Online Site.
I know, at the SP online side, I can get the @odata.context
User Object and then grab the user's EMAIL ADDRESS from it, and then pass it as a variable (e.g, [email protected]
) in the HTTP Request upon calling the Azure Functions App. But that variable can be spoofed and manipulated. I do not want to pass it as a variable.
Is there a better/proper way where SharePoint Client-side Javascript can make the HTTP Request to the Azure Functions App as the currently signed-in SharePoint User, and then the Azure Functions App can know who is calling?
Appreciate for the helps in advance.