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 (https://graph.microsoft.com). 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:
- Request an authorization code
- Request an access token based upon the authorization code. Besides the access token, you also receive a refresh token.
- Make call to the Microsoft Graph endpoint.
- 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