Add additional permissions to GraphHttpClient
With the graph GQL gone, having this "easy" method to query Graph API directly from SharePoint when already authenticated is a huge must have.
For example I'd ask priority on the permissions that let you fetch Recent Files, Trending Files, Trending People, and Planner tasks for the current user. Those make the most sense to be featured on intranet home pages. We do this currently (and it is quite messy with adal.js, particular when it comes to token refreshes), but has lots of end user value.
I have 4 custom web parts today in a SEWP. One gets recent documents, one
gets trending documents, one gets trending people, and one gets O365 Groups
the user is a part of. 3 of those I could get via GQL (no longer)
Groups I can get via GraphHttpClient token and Graph endpoint today.
I can get the token via adal, but it fails alot, especially in token
Getting GraphHttpClient token is easy and never fails from my experience
Thanks for your feedback! We’re happy to report that your suggestion is now part of the SPFx v1.4.1 release with the introduction of AadHttpClient and MSGraphClient classes, which will replace the previously available GraphHttpClient. This new capability is now in preview, in similar ways as GraphHttpClient was, but is planned to move to General Availability within spring 2018. You can read more details on the possibility to use ANY Graph scope from https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph.
7 commentsComments are closed
Any update on this? Would be a great addition.
Kim Rohdin commented
Highly needed! Please post an update
Just wanted to know if there are any updates on this and if there is an estimated time frame as to when we can expect this to be implemented.
Britt M commented
Will GraphHttpClient be expanded as planned, and when will this be avaliable for production ?
Ralf Brennscheidt commented
I highly agree with this. Behind the GraphAPI are the most interesting and exciting features we (the developers) would like to utilize much more without the hassle of fighting with tokens (adal.js). Especially the /beta endpoints.
Ole Bergtun commented
the dream, but i would really add the possibility for the logged on user to create messages... yes i could use adal, but ... there should be some kind of a graph permissions config file for sharepoint framework fx parts
Congrat to introduce the availability to connect graph ressources more easily (without ADAL).
GraphHttpClient is currently limited to Groups (not members) et report. It will be very usefull to extend to all graph ressources. Developper could build amazing dashboard with multi origin information.