How Microsoft Graph Provides an 'Internet of Your Things'
No, Microsoft Graph can't help you with your teenager's geometry homework. However, what it can do is make your life as a developer in the Microsoft ecosystem much easier, said company exec Mark Stafford, who explained just how that works in today's Visual Studio Live! keynote address.
But first, he had to get over that name confusion.
"It's a common misconception that Microsoft Graph has something to do with charting; it really doesn't," said Stafford, principal program manager for the Graph Team at Microsoft.
Stafford was on hand in Chicago to explain how Microsoft Graph works and how it eases many of the tasks that Visual Studio Live! attendees face on a daily basis, in a keynote titled "Microsoft Graph - The Internet of YOUR Things."
The tool's official documentation states: "You can use the Microsoft Graph API to interact with the data of millions of users in the Microsoft cloud. Use Microsoft Graph to build apps for organizations and consumers that connect to a wealth of resources, relationships, and intelligence, all through a single endpoint: https://graph.microsoft.com."
As a foundation for his presentation that explained what that really means with hands-on examples, Stafford, first outlined three basic premises:
- We all have personal constellations of data.
- Linked data is more useful than data standing alone.
- Really great software, the best software out there, uses data to improve lives.
The "improving users' lives" part of the equation is up to individual developers, but Stafford was on hand to explain how Microsoft Graph can improve developers' lives while they seek to accomplish that greater goal.
After laying his foundation, Stafford went on to demonstrate the capabilities of Microsoft Graph, first supplying another definition of the tool: "Microsoft Graph is a unified REST API and comprehensive developer experience for integrating the data and intelligence exposed by Microsoft services."
One of the primary ways it eases developer workloads is unifying API access to the universe of Microsoft products and services.
Whereas previously developers had to manually look up what APIs could surface particular data, Graph provides one place to access that and other information, while also providing a comprehensive development experience with SDKs, documentation, application registration and so on.
Before Graph, many details had to be to first be addressed when working with each individual service. It took a lot of time just to get set up to work with individual APIs, and those setup details can now be handled from one place.
"So really what we've done is fundamentally transform the ability for you to build applications," Stafford said. "It used to be that you would spend a ton of time just trying to get started. You would have to track down the API first, then you would have to read the documentation, and then you would have to onboard your application and get an application ID, and then you'd have to read the docs about the API itself and spend time building against it, and all that work left you very little time to actually add value to your application.
"Just adding Microsoft Graph has changed that somewhat, but also, as part of the Microsoft Graph team, I can say that we have been very, very focused on reducing as much of the overhead as possible and making your lives as easy as possible."
To do that, Graph APIs are being emphasized throughout the vast company's development teams, with developers being "strongly encouraged" to expose their APIs via Graph. Stafford noted that the importance of Graph within Microsoft was exemplified by its presence at the most recent Build conference, where Graph was mentioned 69 times during keynote presentations alone.
Even more exciting than that, he said, was the amount of data presently accessible in Graph, which started out focusing mainly on organizational data such as users, groups, reports and so on. That initial trove of data has been steadily expanding, and now Graph touches upon Azure Active Directory, Excel, OneDrive, OneNote, Outlook, SharePoint and many more.
"This is a really, really big bet for us," he said. "It is where the majority of our REST API efforts are focused for the foreseeable future." Those efforts include a lot of open source code, and Stafford noted that Microsoft Graph-related resources are available in GitHub repositories.
As a REST API, Stafford went on to demonstrate how Graph can be used to access data with the familiar REST scheme of HTTP verbs, resource identifiers, query string parameters to filter returned data and so on.
One way to get familiar with Graph and its capabilities is the Graph Explorer tool, which Stafford said can also be used as "a useful debugging tool when you're building your application." For example, a developer facing problems with an application that leverages a user's data can log in to Graph Explorer as that user and perform some operations -- changing parameters and other details on the fly -- to help identify where the problem lies.
The Graph Explorer and other resources, such as examples, quick starts, documentation, samples and SDKs and more are all accessed via the single https://graph.microsoft.com endpoint, even though the URL redirects on the Web.
Quick Starts, for example, provide a precanned way to literally go press F5 and get a "completely ready-to-go application" running against Microsoft Graph, Stafford said.
Stafford demonstrated several advanced capabilities of Graph, including: special query patterns; WebHooks (HTTP callbacks) for providing notifications of changes made to data; delta capabilities that provide only changes made to data rather than repeatedly supplying full data sets; batching of requests; and more.
But he also spent some time in trying to "light that fire of imagination" in attendees about application ideas, pointing out the useful functionality of a sample app that manages out-of-office periods, letting users cancel calendar invites they own, decline other invitations, reassign tasks and so on.
Graph can be used for much more, said Stafford, who noted how it works with major national clouds and can be used to build a variety of apps, such as portals, intelligent bots and more. One interesting use, he explained, was in connected devices. BMW, for example, is using Graph to let drivers monitor their work calls from cars. Graph also works with Amazon Alexa, Microsoft Cortana and Cortana-enabled devices.
In the end, Stafford said, "Graph is the place to go to."
In the meantime, developers using tools and services in the Microsoft ecosystem might want to go to Anaheim, Calif., for the next Visual Studio Live! event scheduled for Oct. 16-19, or Orlando, Fla., where a conference is being held from Nov. 12 through Nov. 17.
David Ramel is the editor of Visual Studio Magazine.