Forum Discussion
Sharepoint framework and Graph API
From all that I've read/seen so far, it is not yet possible to call the Microsoft Graph API directly from an SPFx web part. I assume it is something that is being worked on and potentially even being addressed at Ignite. However, just so I could play with some ideas in anticipation of that, I followed the guidance in this blog post by Chris Johson to grab an auth token using PostMan to submit with my httpClient.get request. You have to implement the IHttpOptions interface and add an authorization bearer token. It's obviously not a realistic long-term approach but definitely something that you can leverage for now while the SPFx is still in preview.
One hint: I had to use the actual Chrome PostMan plug-in. For some reason, the stand-alone Windows client would not render my O365 login screen correctly. Seemed like something to do with how the PostMan client called the Chrome rendering engine or something.