I need to invoke the GRAPH API from a SharePoint Online page. Could someone share a JavaScript example? The examples available in the GRAPH site are for invoking the GRAPH API from outside SharePoint Online.
I know a token is required for each request, and you must sign-in to get that token. However, if I'm calling the GRAPH API from within SharePoint Online, it means that I'm already authenticated, so it doesn't make sense to sign-in again. The token should be available somewhere, and I don't know how to get it (it's not available in the SharePoint Online URL).