Getting Started With Microsoft Graph API Explorer

Microsoft Graph

Microsoft Graph provides a Single REST API endpoint to access the multiple Microsoft cloud API services such as Office 365, Exchange Online, Azure Active Directory, SharePoint etc. So there is a single authentication to access all services with the help of one REST API endpoint.

The following steps would require you to get the information from Office 365,

  1. Find the appropriate endpoint related to the cloud service using Discovery service.
  2. Identify the URL of the services your Office 365 apps want to connect to.
  3. Then get the access token from the appropriate service and make the request to the server directly.
  4. To get the information from multiple services, we have to get the multiple access tokens for each service.

But by using Microsoft Graph API, we can perform the same complex operation via a single REST API endpoint. For this we not need to discover the endpoints for each service, no need to get the access token for each service for authentication.

Graph API Queries

I have listed below some of the sample queries of Microsoft Graph API, which are used against the Microsoft cloud services.


Service endpoint

GET my profile

GET my files

GET my photo$value

GET my mail

GET my calendar

GET my manager

GET last user to modify file foo.txt

GET unified groups I’m member of$/$filter=groupTypes/any(a:a%20eq%20'unified')

GET users in my organization

GET group conversations<id>/conversations

GET people related to me

GET my tasks

GET my notes

GET files trending around me

GET people I am working with

To view the list of common Graph API queries, refer this article.

Microsoft Graph API Explorer

Now we understand the Microsoft Graph and its queries, but how we can test the queries?

Microsoft also gives the answer via Microsoft Graph API explorer. By using this we can test any query of Graph REST API and get the results in the form json.

Follow the below steps to use the Microsoft Graph Explorer API,

  1. Navigate to Microsoft Graph API site,

    Microsoft Graph site
                                           Figure 1 Microsoft Graph site

  2. Click Graph Explorer from the top navigation.

  3. If you are not already logged in to the site, click SignIn,

    Graph Explorer
                                  Figure 2 Graph Explorer

  4. After signing in to the page, you’ll be ready to test the queries.

  5. We have two buttons on the Explorer tool. Method button and Version button.

  6. Method has below four options and that says, how the query would send to the server as a request,

    a. GET (default)
    b. POST
    c. PATCH
    d. DELETE

  7. Version button has the below two options for now and that says what tool to request based on the selected version,

    a. Beta
    b. V1.0 (default)

  8. Add the query URL in query box and press Enter to send the query request.

  9. The response result is rendered to the content box in json format and response headers rendered below the “Response Headers” heading.

  10. The response time taken for response time (Receiving request, processing the request, sending response) is also shown in the Explorer.

  11. For example, to get the groups in Office 365, use the query ““ and find the response in below screenshot,

    Graph Explorer Request & Response
                             Figure 3 Graph Explorer Request & Response