# How to Connect Open WebUI to OneDrive for Local AI Models

Open WebUI OneDrive integration links self-hosted web chat interfaces to Microsoft OneDrive accounts via Model Context Protocol, enabling local models to query enterprise documents without local vector DB overhead. This tutorial covers native Microsoft Graph integration alongside remote Streamable HTTP MCP deployment to keep document context persistent, versioned, and searchable.

Source: https://fast.io/resources/open-webui-onedrive/
Author: [Tom Langridge](https://fast.io/authors/tom-langridge/)
Last reviewed: 2026-09-13

## Why Connecting Open WebUI to Enterprise Cloud Storage Requires Dedicated Indexing

Deploying Open WebUI in containerized environments often hits a severe resource bottleneck when connecting to enterprise file shares: extracting and vectorizing multi-gigabyte document libraries locally quickly exhausts Docker volume memory limits and triggers out-of-memory container crashes. When self-hosting open-weight models through Ollama, vLLM, or LM Studio, developers frequently want their conversational agents to reference organizational knowledge stored in cloud drives. Most teams store their active spreadsheets, vendor agreements, and operational PDFs across platforms like Microsoft OneDrive, SharePoint, Google Drive, Box, or Dropbox. Bringing those files into a local conversational interface requires bridging cloud file systems with local inference engines.

Open WebUI OneDrive integration links self-hosted web chat interfaces to Microsoft OneDrive accounts via Model Context Protocol, enabling local models to query enterprise documents without local vector DB overhead. In a typical self-hosted deployment, Open WebUI manages user accounts, conversational history, and chat completions while communicating with model providers over standard HTTP APIs. To ground these models in private documents, the platform provides Retrieval Augmented Generation (RAG) capabilities. However, feeding enterprise cloud storage into a containerized RAG pipeline introduces distinct performance tradeoffs.

When an interface attempts to download, parse, and embed hundreds of corporate files on demand, local hardware resources face immediate strain. Embedding pipelines running inside Docker containers must allocate memory for document parsing engines such as Apache Tika or Docling, generate vector embeddings using local embedding models, and store multidimensional vectors in local databases like ChromaDB. When large technical manuals or multi-megabyte spreadsheets arrive from OneDrive, these localized embedding routines consume substantial memory, resulting in slowed model responses or crashed host processes.

To solve this challenge, engineering teams use two primary methods to connect Open WebUI to Microsoft OneDrive:

* **The Native Microsoft Graph Connector.** Open WebUI includes built-in support for Microsoft Entra ID (formerly Azure AD) and Microsoft Graph, allowing users to pick individual files from OneDrive through browser pop-ups.
* **The Remote Model Context Protocol (MCP) Bridge.** Rather than downloading files into the local web server, teams sync OneDrive folders to an intelligent workspace like Fastio, which auto-indexes content in the cloud and surfaces a remote Streamable HTTP MCP server that local models can query dynamically.

Understanding how both pathways function allows teams to choose the right balance between configuration complexity, container resource consumption, and retrieval accuracy.

## How to Configure the Native Open WebUI OneDrive Integration via Microsoft Graph

Open WebUI includes a native cloud storage connector that interfaces directly with Microsoft Graph. This integration allows authenticated users to open a OneDrive file picker inside the chat interface, select specific documents, and ingest those files into Open WebUI's local knowledge base.

Configuring this native integration requires creating an enterprise application registration in the Microsoft Entra ID admin center and mapping the resulting credentials into your Open WebUI deployment.

### 1. Create a Microsoft Entra ID App Registration

To grant Open WebUI permission to access Microsoft 365 data, register an application in your organization's Microsoft Entra ID tenant:

1. Sign in to the [Microsoft Entra ID admin center](https://entra.microsoft.com/) as an administrator.
2. Navigate to **Identity > Applications > App registrations**.
3. Select **New registration**.
4. Assign a descriptive name, such as `Open WebUI OneDrive Connector`.
5. Under **Supported account types**, select **Accounts in this organizational directory only (Single tenant)** for internal business use, or **Accounts in any organizational directory** if supporting multitenant access.
6. Leave the Redirect URI empty during initial registration and click **Register**.

### 2. Configure the Single-Page Application (SPA) Redirect URI

Open WebUI is a single-page web application that utilizes the Microsoft Authentication Library (MSAL) for client-side authentication. It requires an SPA redirect platform:

1. From your app registration overview, select the **Authentication** tab.
2. Click **Add a platform** and choose **Single-page application (SPA)**.
3. Under **Redirect URIs**, enter the base URL of your Open WebUI instance, such as `https://chat.example.com`.
4. Under the **Implicit grant and hybrid flows** section, check both **Access tokens** and **ID tokens**.
5. Click **Configure** to persist the changes.

### 3. Grant Microsoft Graph Delegated Permissions

Next, specify the exact delegated permissions required to read files from OneDrive and SharePoint:

1. Select the **API permissions** tab from the app registration sidebar.
2. Click **Add a permission** and select **Microsoft Graph**.
3. Select **Delegated permissions**.
4. Search for and check the following permission scopes:
   * `Files.Read`: Reads files accessible to the signed-in user.
   * `Files.Read.All`: Reads all files that the user has permission to access.
   * `Sites.Read.All`: Reads items in all SharePoint site collections the user can access.
   * `User.Read`: Reads the user's basic profile.
   * `Sites.Search.All`: Enables keyword search across SharePoint document libraries.
5. Click **Add permissions**.
6. Click **Grant admin consent for your organization**. Admin consent is mandatory because Open WebUI requests the `.default` scope; without admin consent, standard users receive an authentication block.

### 4. Configure Open WebUI Environment Variables Copy the **Application (client) ID** and **Directory (tenant) ID** from the application's Overview page. Add the following environment variables to your Open WebUI `docker-compose.yml` file:

```yaml
services:
  open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    environment:
      - ENABLE_ONEDRIVE_INTEGRATION=true
      - ONEDRIVE_CLIENT_ID_BUSINESS=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
      - ONEDRIVE_SHAREPOINT_TENANT_ID=yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
      - ONEDRIVE_SHAREPOINT_URL=https://yourtenant.sharepoint.com
    ports:
      - "3000:8080"
    volumes:
      - open-webui-data:/app/backend/data
```

Restart the container to apply the configuration.

### 5. Enable the Admin Toggle Setting environment variables alone does not expose the file picker to end users. A system administrator must enable the feature in the database settings:

1. Log in to Open WebUI as an administrator.
2. Navigate to Document Settings in the admin interface.
3. Locate the **OneDrive** switch and toggle it to **Enabled**.
4. Refresh your browser session.

Users can now click the attachment menu (`+`) in any chat, select **Microsoft OneDrive (work/school)**, authenticate through a Microsoft pop-up window, and pick files to upload into the conversation.

## Why Local ChromaDB Vectors Fail in Containerized Open WebUI Deployments

While the native Microsoft Graph integration provides a functional UI picker, enterprise teams running automated agents frequently run into architectural constraints.

### Manual File Selection vs. Autonomous Retrieval

The native connector relies on a client-side file picker driven by browser pop-ups. A human user must manually click the file dialog, authenticate via MSAL, browse folder trees, and attach specific documents. Autonomous agents, background cron tasks, or headless local model workflows cannot interact with this browser-gated picker. If an Ollama model needs to answer questions across a folder containing hundreds of project files, a human must manually select and ingest every document in advance.

### Container Memory Spikes and ChromaDB Allocation Failures

When a user selects documents via the native OneDrive picker, Open WebUI downloads the files to its local backend container. The application then runs local text extraction, splits documents into text chunks, calculates vector embeddings, and writes those records to ChromaDB.

Processing large PDFs, scanned receipts, and technical manuals within a standard Docker container rapidly consumes system RAM. Open WebUI container deployments frequently fail when local ChromaDB vectors exceed Docker volume memory allocations. If the Docker host enforces strict memory limits for the container, ingesting multiple multi-megabyte documents simultaneously triggers Linux out-of-memory (OOM) termination, abruptly killing the Open WebUI container.

### Stale Vectors and Broken Synchronization

Enterprise documentation is rarely static. Project briefs, budget projections, and engineering requirements undergo frequent revisions in OneDrive. When a file is modified in OneDrive, Open WebUI's internal vector database remains unaware of the update. The vector store holds historical chunks until an operator manually deletes the outdated document and re-ingests the revised file. This creates information drift, where local models answer questions based on obsolete context.

## How Model Context Protocol Replaces Local Vector Database Overhead

To bypass container memory bottlenecks and eliminate manual file picking, organizations connect Open WebUI to external storage using the Model Context Protocol (MCP). Developed as an open standard for connecting AI clients to external tool servers, MCP enables conversational models to execute queries against remote systems at inference time.

Instead of pulling entire document libraries into Open WebUI's local ChromaDB instance, teams maintain their authoritative documents in Microsoft OneDrive, sync those folders into an intelligent workspace platform, and connect Open WebUI to the workspace through a remote MCP server.

```
+----------------------------------------------------------------------+
|                         MICROSOFT ONEDRIVE                           |
|                 Enterprise Folders & Office Files                    |
+-----------------------------------+----------------------------------+
                                    |
                                    | Scheduled / On-Demand Sync
                                    v
+----------------------------------------------------------------------+
|                          FASTIO WORKSPACE                            |
|  - Intelligence Mode (Full-Text & Semantic Hybrid Indexing)          |
|  - Cloud Sync (Dropbox, Box, OneDrive sync; Google Drive import)     |
|  - Per-File Version History & Append-Only Audit Log                  |
+-----------------------------------+----------------------------------+
                                    |
                                    | Streamable HTTP (/mcp/key)
                                    v
+----------------------------------------------------------------------+
|                             OPEN WEBUI                               |
|  - External Tool Server: MCP (Streamable HTTP)                       |
|  - Ollama / vLLM / Local AI Models                                   |
|  - Dynamic Semantic Queries at Inference Time                        |
+-----------------------------------+----------------------------------+
```

### How Open WebUI Implements Model Context Protocol

Open WebUI's architecture treats MCP tools as first-class capabilities that models can call dynamically during inference. Rather than using desktop stdio pipes, Open WebUI implements native MCP support over **Streamable HTTP**. This design aligns with multi-user web environments: browser sessions and background tasks communicate with external tool servers using standardized HTTP requests without managing child processes on the server host.

When a user prompts a model in Open WebUI, the model inspects its available tools. If the query references enterprise documentation, the model generates a tool call directed at the remote MCP server. The MCP server executes the query against pre-indexed workspace storage, extracts the most relevant text passages, and returns the grounded snippets with source citations. Open WebUI then incorporates these snippets into the model's context window.

### The Fastio Workspace Advantage

Connecting Open WebUI to OneDrive through Fastio provides a managed coordination layer that eliminates local embedding overhead:

* **Decoupled Document Ingestion.** Fastio syncs OneDrive folders on a schedule or on demand and exposes a remote MCP endpoint for instant semantic lookup. Folders in OneDrive, Box, or Dropbox remain in sync (Google Drive imports today with sync coming soon; sync is never real-time). Local Docker hosts never need to run embedding models or host ChromaDB vector indexes.
* **Hybrid Semantic Retrieval.** Fastio's built-in Intelligence Mode auto-indexes uploaded and synced files on arrival. It combines exact full-text keyword matching with semantic vector retrieval. The model searches across indexed content instead of pulling whole folders over the network.
* **Granular Access and Security.** Fastio workspaces enforce permissions across organizations, workspaces, and folders. Every document change and agent retrieval is recorded in an append-only audit log, ensuring complete traceability.
* **Version History Protection.** When files are edited in OneDrive and synced to Fastio, per-file version history maintains prior iterations. If a document is updated, queries immediately reflect the newest content while preserving the ability to inspect historical revisions.

## Steps to Connect Open WebUI to Fastio Remote Streamable HTTP MCP

Configuring Open WebUI to query OneDrive files through Fastio requires setting up folder synchronization, obtaining an API key, and registering the Streamable HTTP endpoint in Open WebUI's administrative settings.

### Step 1: Sync OneDrive Folders into a Fastio Workspace

First, establish the synchronization link between your Microsoft OneDrive account and a Fastio workspace:

1. Log in to your Fastio account at `https://fast.io`. Creating an account is free; doing real work requires an organization on a paid subscription, which starts with a 14-day free trial requiring a credit card.
2. Create a new workspace dedicated to your project documents. Agent-created workspaces default to Intelligence enabled, ensuring files are automatically indexed for search and RAG retrieval.
3. Navigate to **Cloud Sync** inside the workspace settings.
4. Select **Microsoft OneDrive** from the available storage providers (Fastio supports Cloud Sync for OneDrive, Dropbox, and Box, with Google Drive available for import today and sync coming soon).
5. Authenticate via OAuth to grant read access to your Microsoft account.
6. Select the specific OneDrive folder containing the documents you wish to expose to your AI models.
7. Choose your sync schedule (such as hourly or daily on demand) and direction. Fastio begins indexing the documents immediately upon arrival.

### Step 2: Generate a Scoped Fastio API Key

To authenticate Open WebUI with the Fastio MCP server:

1. In Fastio, open your user profile settings and select **API Keys**.
2. Click **Create New Key**.
3. Assign a descriptive label, such as `Open WebUI MCP Integration`.
4. Scope the key to the specific organization or workspace housing your OneDrive documentation.
5. Copy the generated API key. Fastio API keys authenticate requests when passed in the `Authorization: Bearer <API_KEY>` header.

### Step 3: Register the Streamable HTTP MCP Server in Open WebUI

Open WebUI restricts MCP server registration to system administrators. Follow these steps to register the connection:

1. Sign in to Open WebUI with an administrator account.
2. Open the Admin Panel and navigate to the **Integrations** section.
3. Locate the **External Tool Servers** section and click **+ Add Connection**.
4. In the configuration dialog, configure the connection parameters:
   * **Type**: Select **MCP (Streamable HTTP)** from the dropdown. Do not select OpenAPI.
   * **Server URL**: Enter `https://mcp.fast.io/mcp/key`. This endpoint is configured to accept API keys passed via standard HTTP Bearer authentication headers.
   * **Auth**: Select **Bearer**.
   * **Key**: Paste your Fastio API key generated in the previous step.
5. Click **Save**.

Open WebUI initializes a handshake with the Fastio MCP endpoint, discovering the available storage, search, and retrieval tools.

### Step 4: Enable MCP Tools in Chat Sessions or Model Presets Once registered, the MCP tools can be attached to any conversational model:

1. Navigate to the main Open WebUI chat interface.
2. Click the integration controls or model configuration icon.
3. Open **Tools** and verify that the Fastio tools appear in the active tools list.
4. Enable the search tools for your preferred model (such as Llama, Mistral, or Qwen running locally via Ollama).

You can also pre-configure these tools on custom model presets. Navigate to **Workspace > Models**, edit your target model, and enable the Fastio MCP connection under the **Tools** section so that all conversations using that model automatically possess retrieval capabilities.

### Step 5: Verify Retrieval in Chat

Test the end-to-end integration by asking a specific question about your OneDrive documentation:

```text
User: What are the primary deliverables outlined in the Q3 vendor agreement stored in OneDrive?
```

When prompted, the model triggers a call to Fastio's MCP server. Fastio runs a hybrid search across the synced OneDrive documents, identifies the matching passages, and returns the content with source document names and page references. The model synthesizes the answer directly in chat without downloading the underlying PDF into your local Docker container.

## How to Query Structured Document Data Using Metadata Views

While semantic search answers conversational questions effectively, enterprise workflows often require querying documents by specific structural attributes, such as finding all vendor contracts with renewal dates before next month or filtering invoices exceeding high approval thresholds.

Standard vector databases struggle with precise numerical comparisons and discrete schema matching because semantic embeddings measure conceptual similarity rather than exact tabular properties. To bridge this gap, Fastio provides [Metadata Views](/product/document-data-extraction/).

Metadata Views transform unstructured files into a live, queryable database. Users describe the fields they want extracted in natural language, and AI designs a typed schema that extracts structured data directly from PDFs, spreadsheets, Word documents, and scanned receipts. Supported column types include:

* **Text**: Counterparties, vendor names, and governing law clauses.
* **Integer & Decimal**: Financial totals, line-item quantities, and billing rates.
* **Boolean**: Compliance indicators, renewal flags, and non-disclosure clauses.
* **Date & Time**: Execution dates, contract expirations, and delivery milestones.
* **JSON & URL**: External identifiers, tracking references, and system links.

Because Metadata Views operate directly inside the Fastio workspace, local models in Open WebUI can query these extracted attributes via the MCP toolset. An Ollama model can execute exact metadata filters across hundreds of OneDrive documents instantly, bypassing the token limits and mathematical inaccuracies common when asking language models to parse large tables directly in their context windows.

## How to Troubleshoot Open WebUI MCP and Storage Connections

When setting up external integrations between Open WebUI, Microsoft OneDrive, and MCP endpoints, several common configuration errors can occur. Review these diagnostic steps if you encounter issues.

### Infinite Loading Screen in Open WebUI Settings

If Open WebUI freezes with a continuous loading spinner after adding an external tool server, the connection type was likely set incorrectly. Entering an MCP endpoint under the **OpenAPI** connection type causes the frontend parser to throw an uncaught JavaScript error.

To resolve this issue:

1. Open your browser developer console and navigate directly to `https://chat.example.com/admin/integrations`.
2. Delete the misconfigured tool server from the list.
3. Re-add the server, ensuring **Type** is explicitly set to **MCP (Streamable HTTP)**.

### "Failed to Connect to MCP Server" Error If chat attempts fail with a connection error despite the server passing initial verification, check your authentication headers:

* **Empty Bearer Key**: If you select **Bearer** authentication in Open WebUI, you must provide a valid API key in the Key field. Leaving it blank causes Open WebUI to send an empty bearer token header, which the MCP server rejects with an HTTP unauthorized status.
* **Correct URL Endpoint**: When passing an API key in an Authorization header, use `https://mcp.fast.io/mcp/key`. The standard `/mcp` route is designed for in-band token negotiation, whereas `/mcp/key` expects the Bearer header.

### Microsoft Pop-Up Blockers Blocking Native Picker

If you use the native Microsoft Graph picker and clicking the attachment icon produces no response, your web browser is likely suppressing the MSAL authentication pop-up window. Microsoft Entra ID authentication flows require interactive pop-up authorization. Add an exception to your browser's pop-up blocker for your Open WebUI domain, or use Microsoft Edge, which handles Entra ID authentication redirects with native browser integration.

### Managing Context Windows with Local Ollama Models

When connecting local models to enterprise storage, monitor the relationship between retrieved document chunks and the model's maximum context length. Running open-weight models with standard context windows can cause context truncation if tools return oversized text blocks. Fastio's hybrid search returns concise, preview-matched passages rather than full document dumps, ensuring that local models receive high-density context without overflowing their prompt buffers.

## Frequently asked questions

### How do I connect Open WebUI to Microsoft OneDrive?

You can connect Open WebUI to Microsoft OneDrive using either its native Microsoft Graph connector or a remote Model Context Protocol (MCP) server. The native method requires creating a Microsoft Entra ID App Registration with delegated Files.Read permissions and enabling the OneDrive toggle under Admin Documents settings. The MCP method involves syncing your OneDrive folder to an intelligent workspace like Fastio and adding Fastio's Streamable HTTP MCP endpoint under External Tool Servers in Admin Integrations.

### Can Open WebUI use MCP servers to search OneDrive?

Yes. Open WebUI natively supports MCP tool servers over Streamable HTTP. By syncing OneDrive files to a platform that provides a remote MCP server, models in Open WebUI can execute semantic searches and retrieve relevant document excerpts dynamically during conversations without downloading full files into the local container.

### How do I ground Ollama models in OneDrive documents using Open WebUI?

To ground local Ollama models in OneDrive files, register a remote Streamable HTTP MCP server connected to your synced OneDrive storage in Open WebUI Admin Integrations. Then, attach the MCP search tools to your Ollama model in chat or via custom model presets. When you ask questions about your documents, the model automatically queries the MCP tool to retrieve verified facts and citations.

### Why does Open WebUI fail with memory errors when uploading large files?

Open WebUI processes uploaded documents locally by extracting text, generating vector embeddings, and indexing them in ChromaDB. In containerized deployments with constrained Docker RAM allocations, ingesting large PDFs, spreadsheets, or technical documentation spikes memory usage, triggering out-of-memory container crashes. Offloading indexing to an external workspace via MCP prevents local container memory exhaustion.

### Does Open WebUI support stdio or SSE MCP server connections directly?

Open WebUI's native MCP integration is designed specifically for Streamable HTTP rather than local stdio or Server-Sent Events (SSE). Because Open WebUI is a multi-user web application, Streamable HTTP provides reliable connection management across browser sessions. Connecting stdio or legacy SSE servers requires using an external protocol translation proxy.

## Sources

- [Open WebUI Documentation: OneDrive and SharePoint Integration](https://docs.openwebui.com/tutorials/integrations/onedrive-sharepoint/) — Open WebUI is a Single-Page Application (SPA) and uses the Microsoft Authentication Library (MSAL).
- [Open WebUI Documentation: Model Context Protocol (MCP)](https://docs.openwebui.com/features/extensibility/mcp/) — Native MCP support in Open WebUI is Streamable HTTP only.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server at https://mcp.fast.io/mcp, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli.
