If you are using Microsoft Azure - more specifically the SaaS products like Exchange Online, SharePoint Online or Teams you have the opportunity to get many information through the Graph API. In this article you will get a short introduction into the Graph API.
Introduction
API is an abbreviation and stands for Application Programming Interface. This is used by programmers to access programmatically functions to achieve certain tasks. This serie will give you an intro into using this API. If you are not a programmer this first article could still be interesting for you to get an overview what’s possible.
First steps with Graph API
Don’t worry - for the first steps you don’t need to be a developer. We will use a tool to explore the API: The Graph Explorer from Microsoft .
Just follow the following simple steps:
- Open the Graph Explorer
- Click on
my profile
(marked as 1) - Click on
Run query
(marked as 2)
Now following things happen:
- Through the Graph Explorer the following API request will be done:
GET https://graph.microsoft.com/v1.0/me
- this is a simple request over HTTP to the Graph API backend. - The Graph API backend will send an answer back. Technically the response is a JSON structure. This answer is visible in the bottom part of the Graph Explorer (see following screenshot).
That was super easy, right?
Next steps
As we saw a query against the backend is easy and no coding is involved. To get more insights I advise you to play around with the Graph Explorer. Try the following things:
- Check available queries where you selected before
my profile
- you will see that there are many different areas where you could get information about. - Sign into your Azure AD account and issue the first query
my profile
again. You will see details about your account. It is also worth to switch to the beta API; you will get additional information about you.
So now thats all for the first contact with the API. In the following series we will dive a little bit deeper…
Further Reading
Beside of reading this serie you will find additional information on the following web site(s):