> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-process-dev.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring the Microsoft Graph Action

<Badge icon="arrow-left" color="gray">[Back to Actions Integrations](/ai-for-service/integrations/overview#actions)</Badge>

Connect Microsoft Graph to create, view, and update events and to-do lists, and send emails. See [Microsoft Graph](https://azure.microsoft.com/en-us/get-started/azure-portal) for more information.

***

## Authorizations Supported

The XO Platform supports basic authentication for Microsoft Graph. See [App Authorization Overview](../../../dev-tools/bot-authorization/bot-authentication.md) for details.

<Note>Microsoft Graph integration can only be authorized for Developer and Enterprise editions — not Trial. See [Microsoft Graph documentation](https://developer.microsoft.com/en-us/graph/graph-explorer) for account types.</Note>

| Authorization Type                       | Basic OAuth |
| ---------------------------------------- | ----------- |
| Pre-authorize the Integration            | Yes         |
| Allow Users to Authorize the Integration | Yes         |

***

## Step 1: Enable the Microsoft Graph Action

**Prerequisites:**

* Create a developer account in Microsoft Graph. See [Microsoft Graph Documentation](https://developer.microsoft.com/en-us/graph/graph-explorer).
* Copy the Client ID, Client Secret Key, Authorization URL, and Callback URL.

**Steps:**

1. Go to **App Settings** > **Integrations** > **Actions**.
2. In the **Available** region, select **Microsoft Graph**.

### Pre-authorize the Integration

**System Authorization**

1. Go to **App Settings** > **Integrations** > **Actions** and select **Microsoft Graph**.

2. In **Configurations**, select the **Authorization** tab.

3. Set **Authorization Type** to **Pre-authorize the Integration** > **OAuth**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img2.png" alt="Authorization type-OAuth" />

4. Select the **System** card and click **Authorize**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img3.png" alt="Enable the Kore.ai's preconfigured Microsoft Graph app" />

5. You are redirected to `https://login.microsoftonline.com/`. Enter your credentials and click **Allow Access**.

**Custom Authorization**

1. Select **Custom** and click **Select Authorization** > **Create New**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img4.png" alt="Create new authorization" />

2. Select **OAuth v2**. See [Setting Up Authorization Using OAuth v2](../../../dev-tools/bot-authorization/setting-up-authorization-using-oauth-v2.md).

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img5.png" alt="Auth mechanism type" />

3. Enter the OAuth v2 credentials:

   | Field                  | Description                                                                                                                       |
   | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
   | Call back URL          | Kore.ai XO Platform callback URL                                                                                                  |
   | Identity Provider Name | Name of your custom auth profile                                                                                                  |
   | Client ID              | Client ID from Azure Portal                                                                                                       |
   | Client Secret Key      | Client secret value from Azure portal                                                                                             |
   | Authorization URL      | Microsoft Azure Portal authorization URL                                                                                          |
   | Token Request URL      | Microsoft Azure Portal token request URL                                                                                          |
   | Scope                  | `email Mail.ReadWrite Mail.Send offline_access openid profile User.Read Tasks.ReadWrite Calendars.ReadWrite MailboxSettings.Read` |
   | Refresh Token URL      | Microsoft Azure Portal refresh token URL                                                                                          |

   To register an Azure App, see [Adding the Microsoft Teams Channel](../../../../channels/add-microsoft-teams-channel.md).

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img6.png" alt="Auth credentials" />

4. Click **Save Auth**, then select the new profile.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img7.png" alt="Select auth profile to enable integration" />

5. Click **Authorize**, enter credentials at `https://login.microsoftonline.com/`, and click **Allow Access**.

6. Click **Enable**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img8.png" alt="Integration enabled" />

<Note>The Microsoft Graph action moves from *Available* to *Configured* after enabling.</Note>

### Allow End User to Authorize

1. Go to **App Settings** > **Integrations** > **Actions** and select **Microsoft Graph**.
2. In **Configurations**, select the **Authorization** tab.
3. Set **Authorization Type** to **Allow Users to Authorize the Integration** > **OAuth**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img9.png" alt="Auth type - OAuth" />

**System Authorization**

1. Select the **System** card.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img10.png" alt="Enable the Kore.ai's preconfigured Microsoft Graph" />

2. Click **Enable**. A link is sent to the end user to authorize.

**Custom Authorization**

1. Select **Custom** and click **Select Authorization** > **Create New**, following the Custom Authorization steps above.

2. You can also select an existing profile:

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img11.png" alt="Existing auth profile" />

3. Click **Enable**.

***

## Step 2: Install the Microsoft Graph Action Templates

1. On the **Integration Successful** dialog, click **Explore Templates**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img12.png" alt="Explore templates" />

2. Click **Install** to begin installation.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img13.png" alt="Begin installation" />

3. Once installed, click **Go to Dialog**. A dialog task for each template is auto-created.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img14.png" alt="Dialog task for each template" />

4. Select the desired dialog task and click **Proceed**.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img15.png" alt="Select desired dialog task" />

5. The dialog task is auto-created and the canvas opens with all required entity nodes, service nodes, and message scripts.

   <img src="https://mintlify.s3.us-west-1.amazonaws.com/koreai-ai-for-process-dev/ai-for-service/integrations/actions/images/ms-graph-action-img16.png" alt="Canvas" />


Built with [Mintlify](https://mintlify.com).