We can have various Microsoft cloud products available in our organization. For example,
- Online collaboration : Microsoft 365 (SharePoint, Exchange, TeamsO etc..)
- Cloud Tenant : Microsoft Azure (Azure AD)
- Live accounts (MSA)
In order to programmatically access your resources each service provides their own set of APIs. For example,
- Live : apis.live.com
- Azure AAD : graph.windows.net
- Microsoft 365
- outlook.microsoft.com/api
- <tenant>.sharepoint.com/_api
They have their own authentication and relevant practices. What if we want,
- to query resource across various service providers
- to have a uniform set of API endpoints
Then your solution would be Microsoft Graph. This works as an abstraction layer on top of other resource providers
In order to test Microsoft Graph, Microsoft provides another tool called Microsoft Graph Explorer. With Microsoft Graph Explorer you can either connect to your tenant and interact with respective graph queries or you can use a sample account to try out.
When connecting to your tenant, you have to provide necessary permissions to Microsoft Graph application.
In order to illustrate, I will query for default SharePoint site
We can easily generate code snippets for our queries