Best example for getting the Graph API bearer token in SPFX?

Valued Contributor

What is the best solution that currently shows how to get the Graph API bearer token from a SharePoint SPFX app?


ADAL.JS doesnt work in the modern Script Editor Web Part by @Mikael Svenson


I want to hopefully re-use my existing Javascript Graph API functions, i just need the best way to get the bearer token, and then muddle through working in my existing functions.


1 Reply
best response confirmed by Juan Carlos González Martín (MVP)
Solution or if you can make due with access via Group. permissions, then use GraphHttpClient.

The other option is a server side component to either do ADAL on users behalf, or use app tokens if that works for your scenario.