---

sidebar_position: 14

---
# Set Up the Outlook Connector

The Outlook Connector allows you to ingest emails and attachments from your Outlook mailbox directly into your project. To use the connector, you will authenticate via your Azure account.

Decide on OAuth configuration - Airia managed with required scopes for all Microsoft integrations or Bring your own OAuth connector with custom scopes that best fit your integration and security requirements.

## Set Up with Airia managed OAuth

This one-time setup registers the Airia Microsoft Connector application in your Azure Active Directory (Microsoft Entra ID), allowing it to access organizational data from Outlook.

> 💡 Note:
> *   **Application Name:** `Airia Connector – Web`
> *   **Your tenant ID:** you can see it in platform settings

1.  **Construct Admin Consent URL**
    Use the following format, replacing `<CUSTOMER_TENANT_ID>` with your specific Microsoft tenant ID:
    `https://login.microsoftonline.com/<CUSTOMER_TENANT_ID>/adminconsent?client_id=4969aaba-cdb0-4777-829d-63a9dde52671`
    > 💡 Example: `https://login.microsoftonline.com/your-tenant-id-here/adminconsent?client_id=4969aaba-cdb0-4777-829d-63a9dde52671`
2.  **Open Consent URL**
    Open the constructed URL in a web browser (preferably in an incognito or private browsing window).
3.  **Log In as Azure Admin**
    Log in using an Azure Admin user account that has permissions to grant consent for enterprise applications.
4.  **Review and Grant Consent**
    Review the requested permissions displayed on the screen and click **Accept** or **Grant consent** to approve them on behalf of your organization.
    > 💡 Note: After successful consent, the browser will redirect back to the Airia platform.
5.  **Confirm Application Registration**
    Log into the [Microsoft Entra ID portal](https://entra.microsoft.com/) and navigate to **Enterprise applications**. Confirm that `Airia Connector – Web` is listed in this section.

## Set up with your custom managed OAuth

This guide explains how to configure Outlook connector in Azure AD and integrate it with Airia, allowing Airia to access your mailboxes.

### Configure Your Azure AD App

#### 1. Register Your Application in Azure AD

1.  Navigate to **Azure Portal** > **Microsoft Entra ID** > **App registrations**.
2.  Click **New registration**.
3.  Configure the application details:
    *   **Name**: Enter a descriptive name, such as `Airia SharePoint Site Selected`.
    *   **Supported account types**: Select `Accounts in any organizational directory`.
    *   **Redirect URI**: Enter `Airia Chat`.
4.  Click **Register**.
5.  From the app's **Overview** page, save the **Application (client) ID**. You will need this later.

#### 2. Configure API Permissions

1.  In your registered application's left menu, navigate to **API permissions**.
2.  Click **Add a permission**.
3.  Select **Microsoft Graph**.
4.  Choose **Application permissions**.
5.  Add the following permissions: 
    *   `Mail.Read`
    *   `offline_access`
    *   `User.Read`

6.  Click **Add permissions**.
7.  Click **Grant admin consent for [Your Tenant Name]** and confirm.

#### 3. Obtain Your Client Secret

1.  In your registered application's left menu, navigate to **Certificates & secrets**.
2.  Click **New client secret**.
3.  Provide a **Description** (e.g., `Airia Client Secret`) and set an appropriate **Expires** duration.
4.  Click **Add**.
5.  Copy the **Value** of the client secret immediately. It will only be shown once and is required for Airia integration.

### Create Your OAuth Connector in Airia

#### 1. Add a New Microsoft OAuth Connector

1.  In the Airia platform, navigate to **Settings** > **OAuth connectors**.
2.  Select the **Microsoft** card.
3.  Enter the following details for your new OAuth connector:
    *   **Name**: A descriptive name (e.g., `SharePoint Site Selected Connector`).
    *   **Client ID**: The Application (client) ID you saved from Azure AD (Phase 1, Step 1).
    *   **Client Secret**: The client secret value you saved from Azure AD (Phase 1, Step 3).
    *   **Scopes**: Add the following scopes (matching those configured in Azure AD):
        *   `User.Read`
        *   `Mail.Read`
        *   `offline.access`
4.  Click **Create**.

## Create an Outlook Data Source

### 1. Add an Outlook Data Source

1.  In the Airia platform, navigate to **Available data sources**.
2.  Select the **Outlook** card.

### 2. Configure Data Source Details

1.  Provide the following details:
    *   **Name**: A mandatory, descriptive name for your data source (e.g., `Outlook folder A Data`).
    *   **Description**: (Optional) A brief description up to 1000 symbols. 
    *   **Scope**: Select the Airia project for this data source.
    *   **OAuth connector**: From the dropdown, select the Microsoft OAuth connector you created in Phase 3 or Airia managed OAuth.
2.  For **Credentials**, choose `Create new credential` (this is the only option if you just created the OAuth connector).
3.  Enter a **Name** for the new credential.
4.  Confirm the required scopes for the user authenticating that match the scopes for the Oauth configuration. 
5.  Click **Authenticate**. Complete the OAuth flow by logging in with an account that has access to the SharePoint site.

### 3. Specify Ingestion Settings 
(Optional) Configure the **ingestion settings** based on your specific use case and data requirements. More info ca be found under https://explore.airia.com/integrations/Data-Source-Connectors/Ingestion%20settings 

### 4. Select Folders and Start Ingestion
    Browse and select the content you want to ingest. You can select and deselect individual items.
    *   First, choose the type of mailbox to ingest. The Outlook connector supports ingesting **only one mailbox per data source**:
        *   **Personal Mailbox**: Your own primary Outlook mailbox.
        *   **Shared Mailbox**: A mailbox accessible by multiple users.
    *   If you select **Shared Mailbox**, enter the **email address** for that mailbox in the provided text field.
    *   Click **Next**.
    *   You will then have the option to browse and select specific folders from the chosen mailbox

 > 💡 Tip: Selecting an Outlook folder will sync all supported content within it, including files, subfolders, and their content. Reprocessing the data source will automatically sync newly added content, update modified content, and delete removed items within the selected content.
    > 💡 Note: To edit your content selection, go to the data source and click **Edit**. You may need to reauthenticate. Then click **Next** to make your new selections. If you reauthenticate with new user credentials, the content selector will not show previous selections, and you will need to reselect all desired items.

## Next Steps
 
After your data has been successfully ingested, you can view the ingested emails and their attachments in the data source file list view. Airia captures the relationships between senders, receivers, emails within a thread, and their attachments in a dedicated knowledge graph for your data source.
 
To leverage this knowledge and enable your Agent to answer complex questions (e.g., "Who sent the last email for a specific thread?", "What was the last email by John Doe?", or "How many emails do I have from John Doe?"), you need to configure an Airia native Query Graph DB tool.
 
1.  **Configure the Graph Database Cypher Query Tool**
    1.  Navigate to the **MCP & Tools** tab within your project.
    2.  Select **New tool**.
    3.  Search for `Graph Database Cypher Query` and select it from the library.
    4.  Provide a meaningful **Name** for the tool for easy tracking.
    5.  From the **Select an existing Graph** dropdown, choose the name of your Outlook data source.
    6.  The tool is now ready to be attached to an LLM within an Agent.
 
> 💡 Note: To retrieve semantically relevant information from this data source, you still need to use the data search step in addition to the Graph Database Cypher Query tool.

