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

# Microsoft 365 Integration

> Connect OneDrive and SharePoint to sync documents into your Knowledge Hub

Connect Microsoft 365 to Exec to import OneDrive and SharePoint documents as Knowledge Hub sources. Imported files are searchable, available to the AI agent, and can be referenced from scenarios and programs like any other source.

OneDrive and SharePoint share a single Microsoft 365 connection at the workspace level. Connecting one enables the other, and the same connection also powers [Microsoft Teams call sync](/calls/microsoft-teams) if you use Exec for calls.

## Connection modes

You can connect Microsoft 365 in one of two ways. Pick the mode that matches how you want Exec to see content across your tenant.

| Mode                  | Who can set it up       | What Exec can see                                                                                                       |
| --------------------- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Single user**       | Any workspace member    | Only the OneDrive and SharePoint sites the connecting user can access. Uses a standard Microsoft sign-in.               |
| **Organization-wide** | A Microsoft Entra admin | Every user's OneDrive and every SharePoint site in your tenant. Uses an app registration you create in Microsoft Entra. |

Choose organization-wide if you want to pull documents from anyone in the company. Choose single user if you only need content one person owns or curates.

## Connecting as a single user

<Steps>
  <Step title="Open Integrations">
    Go to **Settings → Integrations** and scroll to the **Content** section.
  </Step>

  <Step title="Connect OneDrive or SharePoint">
    Click the **+** button on the OneDrive or SharePoint card, then click **Connect**. Sign in to Microsoft and approve the requested permissions.
  </Step>

  <Step title="Return to Exec">
    Microsoft sends you back to Exec. Both OneDrive and SharePoint now show as connected — one credential powers both surfaces.
  </Step>
</Steps>

## Connecting organization-wide

Organization-wide connections use a **Microsoft Entra app registration** that your IT admin creates in your own tenant. This lets Exec read documents from every user without each person signing in.

<Steps>
  <Step title="Create the app registration">
    In the [Microsoft Entra admin center](https://entra.microsoft.com), create a new app registration for Exec.
  </Step>

  <Step title="Add Microsoft Graph application permissions">
    Add these application permissions and grant admin consent for your organization:

    * `User.Read.All`
    * `Sites.Read.All` (for SharePoint)
    * `Files.Read.All` (for OneDrive)
  </Step>

  <Step title="Create a client secret">
    Under **Certificates & secrets**, create a client secret and copy its value. Save the tenant ID and application (client) ID as well.
  </Step>

  <Step title="Enter credentials in Exec">
    In **Settings → Integrations**, open the OneDrive or SharePoint card and click **Connect organization-wide**. Paste the **Directory (tenant) ID**, **Application (client) ID**, and **Client secret**, then click **Connect**.
  </Step>
</Steps>

Exec validates the credentials against Microsoft Graph before saving. If a required permission is missing or admin consent has not been granted, the connect step surfaces the error so you can fix it in Entra and retry.

<Note>
  Only a Microsoft Entra admin can create the app registration and grant admin consent. A workspace admin then pastes the credentials in Exec — no personal Microsoft sign-in is used.
</Note>

## Importing files

<Steps>
  <Step title="Open a hub">
    Navigate to the Knowledge Hub and open the hub where the imported files should live.
  </Step>

  <Step title="Add a file">
    Click **+ Add → New File**, then choose the **Microsoft 365** tab.
  </Step>

  <Step title="Browse OneDrive or SharePoint">
    Switch between the **OneDrive** and **SharePoint** tabs. For organization-wide connections, an account sidebar lets you pick which tenant user's OneDrive to browse, or which SharePoint site.
  </Step>

  <Step title="Select files or folders">
    Click into a folder to browse it, or use search to jump to a file by name. Select individual files, or select a folder to import every supported file inside it (up to 500 files per folder on import). Selected items appear in the chips footer.
  </Step>

  <Step title="Import">
    Click **Import**. The picker shows a done screen once the sources are queued, and each file goes through the normal Knowledge Hub processing pipeline. See [Sources](/knowledge-hub/sources) for what happens after upload.
  </Step>
</Steps>

## Keeping content in sync

Imported files keep a reference back to Microsoft 365 and Exec checks each connected file for changes on a 15 minute cron. When the OneDrive or SharePoint file changes, the Knowledge Hub picks up the update on the next cron run — no action needed on your side.

If you want the latest content immediately, open the source and click **Resync** to pull it right away.

Because Microsoft 365 remains the source of truth, the Knowledge Hub does not keep a version history for OneDrive or SharePoint sources — it always mirrors the current state of the original file. (Version history is available for Knowledge Hub [pages](/knowledge-hub/pages).)

## Disabling a service

Each service can be turned on or off independently from its integration card:

* Open the OneDrive or SharePoint card in **Settings → Integrations**.
* Use the **⋯** menu on the connected instance to **Disable OneDrive Sync** or **Disable SharePoint Sync**.

Disabling stops future syncing for that service. Previously imported sources stay in your Knowledge Hub. Re-enabling the service resumes syncing on the next cron run.

## Getting help

Questions about the Microsoft 365 integration? Contact us at [hello@exec.com](mailto:hello@exec.com).
