Architecture & DesignWhat is the Microsoft Graph API?

What is the Microsoft Graph API?

Developer.com content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

The last few years, Microsoft has been talking about the “Microsoft Graph.” If you are a developer in the Microsoft space, it is important that you know what the Microsoft Graph is. This “graph” is not a diagram of lines that plots data into a pretty picture. Rather, the Microsoft Graph is the concept of connecting services and devices in an integrated manner to build solutions across not only Microsoft’s platforms and APIs, but it will also include other platforms such as Android and iOS.

LogoMicrosoft defines the Microsoft graph as the API for Microsoft 365, which securely connects you to Office 365, Windows 10, and enterprise mobility and security (EMS). In very simplistic terms, Microsoft 365 is the multi-sense, multi-device experiences that Microsoft is seeking to provide as a solution for the way in which most people operate today.

Most people want access to their data regardless of the device they are using. They want to be able to seamlessly move from their phone to their desktop to their iPad. In making these transitions, they want the data they use to simply be there in a manner that lets them continue where they left off, regardless of the device they had been using.

The Microsoft Graph is the API platform that Microsoft is providing to help developers make this seamless world across devices work. The Microsoft Graph was an API that tapped into to enormous amount of data provided behind Office 365 but is expanding beyond that. Yina Arenas from Microsoft stated:

Microsoft Graph is your data in Microsoft 365. It is hosted by Microsoft with extensive security and management controls, but it is your data. It is your personal data. It is your organizational data. You control it, and you manage it. We [Microsoft] are bringing together data from across Office 365, Windows, and enterprise Mobility and Security connected by logical relationships.”

At Microsoft Build, the image in Figure 1 was used to provide a snapshot of the Microsoft Graph.

The Microsoft Graph
Figure 1: The Microsoft Graph

It is important to note that individuals and organizations own their own data. Access has to be given to developers for them to be able to use that data. As part of the Graph, Microsoft is giving access to the data within many of their applications, including Outlook, Office, Cortana, and more. With time, it is expected that more and more data will be brought into the Graph from both Microsoft and sources outside of Microsoft. Using the Graph APIs, access for developers should be kept relatively easy.

With over 135 million users on Office 365 Commercial, 400 million Outlook users, and over 90% of the Fortune 500 companies having data in the Microsoft Graph, there is a high probability that if you are building apps that tap into user data such as the over eight terabytes of e-mails, events, user files, and groups, the Microsoft Graph API could be an entry point.

Within the Microsoft Graph, Microsoft has already provided a number of APIs to dig deeper into various areas. This includes education, Intelligent Security, and more. Figure 2 shows a snapshot of the Education API for Microsoft Graph.

The Microsoft Graph Education API
Figure 2: The Microsoft Graph Education API

Developers can access the Microsoft Graph from a REST Endpoint, graph.microsoft.com. As such, any app that can do an HTTP request can tap into the graph. Because the Microsoft Graph API uses Microsoft Cloud services, you’ll need to have a Microsoft account (or an Azure Active Directory account) and agree to the terms of use.

To get an idea of some of the data you have access from your own footprint through the Microsoft Graph, you can use the Graph Explorer, which is shown in Figure 3.

The Microsoft Graph Explorer
Figure 3: The Microsoft Graph Explorer

You can find the Microsoft Graph at this link.

Using the Graph Explorer, you will be able to run a number of sample queries, or you can sign in to a Microsoft account (or an Azure Active Directory account) and run queries against the data it contains. While experimenting, click on the “show more samples” link under the Sample Queries to open a fly-out with additional areas you can query today. In Figure 3, I’ve logged into my Microsoft account. When you run some of the sample queries, you’ll get the actual data presented in the lower half of the window, as shown in Figure 4. Note that I logged out and ran the “my profile” query using the defaulted sample data in the Microsoft Graph Explorer.

Response Preview from Microsoft Graph Explorer with Profile data
Figure 4: Response Preview from Microsoft Graph Explorer with Profile data

Conclusion

The Microsoft Graph is a consolidation of data access for nearly all things Microsoft and beyond. If you are a developer looking to access data from the Microsoft ecosystem now or in the future, it is something you will need to be aware of and understand! As time progresses, Microsoft is hoping to extend the ecosystem not only to more data but across platforms as well.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories