# Microsoft Graph API

This section describes how you can configure the REST connector in Flow Connect to communicate with Microsoft Graph API with Open ID connect.

### App Registration

1. Create a new app registration in Azure
2. Under Authentication section add a new platform configuration for Single-page application

   <figure><img src="/files/aitI5OOyCo5P7fdhLn2N" alt=""><figcaption><p>Choose platform</p></figcaption></figure>
3. Add redirect URI <https://app.novacura.com/> and choose Configure

   <figure><img src="/files/tKJiOe0yKj6U1j6zYZzn" alt=""><figcaption></figcaption></figure>
4. Similarly, you can add redirect URI nccloud://openid for iOS and Android platforms
5. Under API permissions you can add permission for different Microsoft APIs. For the purpose of this documentation, we will add Graph API > Mail.Read operation.

   <figure><img src="/files/GkWQkm58RN8b1TP5cR7W" alt=""><figcaption></figcaption></figure>
6. Optionally, under the Certificates & secrets section create a client secret for your app registration. Copy the client secret value and store it securely.

   <figure><img src="/files/BYV6exeOSpCzEff18s2n" alt=""><figcaption></figcaption></figure>
7. Upon the successful app registration, copy the values for the Application (Client) ID & Directory (Tenant) ID

   <figure><img src="/files/Uspmf797ieFcvX4TdDHS" alt=""><figcaption></figcaption></figure>
8. Finally, under the Endpoints copy the OpenID Connect metadata document URL.

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

### Configure the REST Connector

In [Flow Connect Hub](https://build.novacura.com),

1. Add [new REST connector](/flow-connect/working-with-connect/connect-to-systems/connectors/rest.md#add-connector)
2. Enter the configuration values as described below

   <table><thead><tr><th width="276">Configuration</th><th>Description</th></tr></thead><tbody><tr><td><strong>Agent Group</strong></td><td>Agent group where the connector should be executed</td></tr><tr><td><strong>Base URL</strong></td><td>Should be <a href="https://graph.microsoft.com/v1.0/">https://graph.microsoft.com/</a></td></tr><tr><td><strong>Authentication Type</strong></td><td><p>Choose <strong>OpenId Authentication</strong> as the Authentication Type.</p><ul><li>Give a display name</li><li><p><strong>Authorization Endpoint</strong> - Add OpenID Connect meta data URL excluding ".well-known/openid-configuration"</p><div><figure><img src="/files/26Xpa1ZM8zhcRE32mKG1" alt="" width="375"><figcaption></figcaption></figure></div></li><li><strong>Client ID</strong> - Copied Application (Client) ID</li><li><strong>Scopes</strong> - Keep the default "openid"</li><li><p><strong>Advanced Options</strong></p><ul><li><p>Additionally, you can define advanced options like extra query parameters. </p><p>For example,</p><p><code>prompt = select_account</code> will force the user to select an account if the user has multiple accounts authenticated or previously used on the authorization server.</p></li><li><p>Disable <strong>Validate Endpoints</strong>, <strong>Validate Issuer</strong> <strong>Name</strong>, <strong>Validate Token Issuer Name</strong></p><p></p></li></ul></li></ul></td></tr></tbody></table>
3. Choose **Save**

Example connector configuration:

<figure><img src="/files/6FP7vZVh8SiSCWPVB8R0" alt="" width="563"><figcaption></figcaption></figure>


---

# Agent Instructions: 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:

```
GET https://docs.novacura.com/flow-connect/working-with-connect/connect-to-systems/connectors/rest/microsoft-graph-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
