Microsoft
Microsoft Graph is a RESTful web API that enables you to access Microsoft Cloud service resources. After you register your app and get authentication tokens for a user or service, you can make requests to the Microsoft Graph API.
To read from or write to a resource such as a user or an email message, you construct a request that looks like the following.
https://graph.microsoft.com/{version}/{resource}?query-parameters
The components of a request include:
{version} - The version of the Microsoft Graph API your application is using.{resource} - The resource in Microsoft Graph that you're referencing.After you make a request, a response is returned that includes:
Microsoft Graph uses the HTTP method on your request to determine what your request is doing. The API supports the following methods.
| Method | Description |
|---|---|
| GET | Read data from a resource. |
| POST | Create a new resource, or perform an action. |
| PATCH | Update a resource with new values. |
| PUT | Replace a resource with a new one. |
| DELETE | Remove a resource. |
Microsoft Graph currently supports two versions: v1.0 and beta.
v1.0 includes generally available APIs. Use the v1.0 version for all production apps.beta includes APIs that are currently in preview. Because we might introduce breaking changes to our beta APIs, we recommend that you use the beta version only to test apps that are in development; do not use beta APIs in your production apps.We are always looking for feedback on our beta APIs. To provide feedback or request features, see our UserVoice page.
For more information about API versions, see Versioning and support.
Your URL will include the resource or resources you are interacting with in the request, such as me, users, groups, drives, and sites. Each of the top-level resources also include relationships, which you can use to access additional resources, like me/messages or me/drive. You can also interact with resources using methods; for example, to send an email, use me/sendMail.
For more information about how to navigate resource relationships and methods, see Traverse the graph.
Each resource might require different permissions to access it. You will often need a higher level of permissions to create or update a resource than to read it. For details about required permissions, see the method reference topic.
For details about permissions, see Permissions reference.
You can use optional query parameters to customize the response in your Microsoft Graph app. Use query parameters to include more or fewer properties than the default response, filter the response for items that match a custom query, or provide additional parameters for a method.
For example, adding the following filter parameter restricts the messages returned to only those with the emailAddress property of [email protected].
https://graph.microsoft.com/v1.0/me/messages?filter=emailAddress eq '[email protected]'
For more information about query parameters, see Customize responses.
You're ready to get up and running with Microsoft Graph. To learn more, go to the Graph Explorer to try out some requests, try the Quick Start, or get started using one of our SDKs and code samples.