> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemtipsandtricks/integration/microsoft-integration.md).

# Microsoft Integration

This page shows how you can connect your WEM application to Microsoft services using the Microsoft Graph API. The integration is done via REST API calls and highlights how to retrieve data from the Microsoft graph API.

Rather than a full implementation guide, article is meant to serve as a starting point. The actual setup will depend heavily on your organization’s Microsoft configuration and specific use case. You can find out how to set up and configure application registrations [here ](/platform/wemmodeler/services-and-integration/authentication-providers/saml-2.0/saml-app-registration-in-entraid.md)([microsoft docs](https://learn.microsoft.com/en-us/graph/applications-concept-overview)) and information on the graph API endpoints can be found [here](https://developer.microsoft.com/en-us/graph/graph-explorer).

## The OAuth 2.0 authentication protocol <a href="#the-oauth-2.0-authentication-protocol" id="the-oauth-2.0-authentication-protocol"></a>

To be able to safely make use of external providers there’s always some authentication procedure involved. The WEM Modeler already supports the two main standard industry protocols, SAML 2.0 and OAuth 2.0. The Oauth protocol is used for the Microsoft Graph integrations, using EntraID as authorization provider. The Oauth authentication comes in two flavours, an application can be authorized or a specific user is authorized . Which method is needed for your application depends on your use case.&#x20;

<figure><img src="/files/klrrPZ2aVY9TeqNFHtys" alt=""><figcaption></figcaption></figure>

Using the authentication node shown in the image above makes this implementation easy and quick, with only the authorization profile to be set up. The images below show the OAuth authorization profiles for a application followed by the user method. The biggest difference between the two are the Grant Type used and the portal redirect URLs.&#x20;

<figure><img src="/files/CtGJqTpzNTcDNKIomaYf" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/oS97CoKxEIc5y0dy9k7I" alt=""><figcaption></figcaption></figure>

The last step on the modeler side is using HTTP requests, with the Request URL from the graph endpoint and authentication set to Oauth 2. When this is set up right it will use the bearer tokens provided by the initial authorization to give you access to the graph API-resources. In the below image a HTTP get request is used to request a list of calendar items. &#x20;

<figure><img src="/files/VgUdbE8iM08USSUZJXju" alt=""><figcaption></figcaption></figure>

Once the HTTP request is properly configured and authorized, you can use the response JSON to import data into your application — for example, to display calendar events, user data, or emails directly from your Microsoft environment. Other request methods can be used for adding or updating information in your Microsoft environment.&#x20;

This setup demonstrates the foundation for integrating Microsoft services through the Graph API. From here, you can expand the integration based on your specific needs. Whether you're managing users, reading SharePoint content, or interacting with Teams, the approach remains the same: authenticate, send REST requests, and handle the responses.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.wem.io/platform/wemtipsandtricks/integration/microsoft-integration.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
