Wednesday, 25 January 2017

An Introduction to Microsoft Graph API

In the simplest terms Microsoft Graph is the easiest way to call the Microsoft APIs be it Users, Groups, Mail, Calendars, Contacts, Files etc. all from a single endpoint. This was previously known as the Office 365 Unified API. It exposes multiple APIs from Microsoft Cloud Services like Outlook, OneDrive, OneNote etc through a single REST API endpoint ( Prior to this, in order to fetch data from each of these services you have to make different endpoint calls to the respective services making it a complex procedure. Using Microsoft Graph, you just have to make a single endpoint call to the cloud services and require a single authentication token.
As per Microsoft, “the Microsoft Graph gives you:
  • A unified API endpoint for accessing aggregated data from multiple Microsoft cloud services in a single response
  • Seamless navigation between entities and the relationships among them
  • Access to intelligence and insights coming from the Microsoft cloud”

The Microsoft Graph API uses Azure AD for authentication. The basic flow to get your app authenticated is listed below:
  1. Request an authorization code
  2. Request an access token based upon the authorization code. Besides the access token, you also receive a refresh token.
  3. Make call to the Microsoft Graph endpoint.
  4. When the access token expires, use the refresh token to get a new access token instead of going through the entire authentication flow again.
To read the complete post click on the link here

No comments:

Post a Comment