Use SPFx to get a Delegated Access Token
Note the tokenAcquisitionEvent part of the code doesn't seem to work
Using this technique you can acquire a delegated access token for a resource, SharePoint or the Graph API, and pass that token onto a HTTP triggered Azure Functions endpoint for it to use to call the appropriate API.
This is a simple re-imagination of the on-behalf-of flow involving a secured Azure Functions endpoint then executing an OAuth on-behalf-of flow to exchange the received access token for one which can be used to call an API on behalf of the calling user.
Documented originally by Paolo Pialorsi and Joel Rodrigues