> ## Documentation Index
> Fetch the complete documentation index at: https://koreai-ai-for-work-dev.mintlify.site/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 Platform supports basic authentication for Microsoft Graph. See [App Authorization Overview](/ai-for-service/app-settings#authorization-profiles) 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://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img2.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=aaafa960c728bb97f868f3d883516f9c" alt="Authorization type-OAuth" width="794" height="852" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img2.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img3.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=3f92843282ce29bcde5ba7814d8122d2" alt="Enable the Kore.ai's preconfigured Microsoft Graph app" width="794" height="852" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img3.png" />

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://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img4.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=24e3cb3f094abc14151b0200fa70db75" alt="Create new authorization" width="790" height="848" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img4.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img5.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=d0ca47ffac9e6f63ca66fbcac1ffa14b" alt="Auth mechanism type" width="1186" height="912" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img5.png" />

3. Enter the OAuth v2 credentials:

   | Field                  | Description                                                                                                                       |
   | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
   | Call back URL          | 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](/ai-for-service/channels/add-microsoft-teams-channel).

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img6.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=ba9e10316c2e531ad81ea105f0748fb2" alt="Auth credentials" width="794" height="915" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img6.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img7.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=c1992cdfa85962c8b606b1a6f8e29310" alt="Select auth profile to enable integration" width="794" height="851" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img7.png" />

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

6. Click **Enable**.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img8.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=c5d779af67bbe3ef6608b42b6f502e7e" alt="Integration enabled" width="590" height="230" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img8.png" />

<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://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img9.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=beab6772ea1801ad07f697fbe77edbbf" alt="Auth type - OAuth" width="799" height="850" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img9.png" />

**System Authorization**

1. Select the **System** card.

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img10.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=9610c62dba4d6b80e7b114cf36b202cb" alt="Enable the Kore.ai's preconfigured Microsoft Graph" width="799" height="850" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img10.png" />

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://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img11.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=e318779e662fa133884ed6610566d982" alt="Existing auth profile" width="792" height="846" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img11.png" />

3. Click **Enable**.

***

## Step 2: Install the Microsoft Graph Action Templates

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img12.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=21b12a6036d80c670b4f349490347558" alt="Explore templates" width="590" height="240" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img12.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img13.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=8deffa34c32f70cff6290f7dd1cb7319" alt="Begin installation" width="596" height="634" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img13.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img14.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=18f08a15495807067e332539521bb7cf" alt="Dialog task for each template" width="1919" height="823" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img14.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img15.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=09e6baac1771da64efa7fcec2fe3d8c1" alt="Select desired dialog task" width="798" height="903" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img15.png" />

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

   <img src="https://mintcdn.com/koreai-ai-for-work-dev/ewPaQ3tSY_EES0i2/ai-for-service/integrations/actions/images/ms-graph-action-img16.png?fit=max&auto=format&n=ewPaQ3tSY_EES0i2&q=85&s=73e6d9eec43b2eb02257a0a9f6e7c7f2" alt="Canvas" width="1685" height="914" data-path="ai-for-service/integrations/actions/images/ms-graph-action-img16.png" />
