> ## Documentation Index
> Fetch the complete documentation index at: https://explore.airia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OneNote

# Set Up the OneNote Connector

The OneNote Connector allows you to ingest your notebooks, sections, and pages from your Microsoft 365 account 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 OneNote.

> 💡 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 SharePoint with Site Selected access, SharePoint with all sites read access and OneDrive connectors in Azure AD and integrate it with Airia, allowing Airia to access specific SharePoint sites.

### 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:
   * `User.Read`
   * `Notes.Read.All`
   * `offline.access`
   * `Directory.Read.All`

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`
     * `Notes.Read.All`
     * `offline.access`
     * `Directory.Read.All`

4. Click **Create**.

## Create an OneNote Data Source

### 1. Add a New OneNote Data Source

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

### 2. Configure Data Source Details

1. Provide the following details:
   * **Name**: A mandatory, descriptive name for your data source (e.g., `OneNote Notebook 1 Data`).
   * **Description**: (Optional) A brief description.
   * **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**

### 3.Select Notebooks for Ingestion\*\*

Click **Next** and select the notebooks you want to ingest. You can select and deselect content as needed.

> 💡 Note: To edit your notebook 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 selector will not show previous selections, and you will need to reselect all desired items.

4. **Monitor Ingestion Status**
   Once you provide your connection details, the page will refresh to display the ingestion status. You can view the current ingestion status per notebook by clicking on the data source again. You can easily navigate between sections and pages for a specific notebook by clicking on it.

## Next Steps

After your data has been successfully ingested, the OneNote data source is ready to be used with an Agent.
