Overview
The OneDrive integration lets users connect their OneDrive (personal or work) so Alysio can list and search their files and read or export file content on their behalf. Users can ask Alysio to find files by keyword, list folder contents, export documents (Word, PowerPoint, PDF, text, etc.) to readable content, and save Excel workbooks for analysis with the DuckDB SQL tool—all in natural language. The integration uses the user’s connected Microsoft account and only reads or exports content; it does not create, edit, or delete files in OneDrive.
Supported capabilities / objects
- Files and folders — List files in the root or a specific folder (with pagination, sort, filter); search files by keyword across name and content.
- Content export — Export file content for supported types: Office docs (Word, PowerPoint, etc.) and PDF (converted to text), Loop/Fluid/Whiteboard (HTML), and common text/code formats. Files over 5MB return a shareable download link instead of inline content.
- Excel for analysis — Save Excel file content to a table format for use with the
execute_sql_query (DuckDB) tool.
Authentication
Method: OAuth 2.0 (Microsoft/Azure AD). The MCP sends requests using a Bearer token and a credential ID that identifies the user’s connected Microsoft account.
Redirect URI: Configured when the OneDrive integration is set up in Alysio. The Azure AD app must allow this redirect URI.
Token handling
- OAuth tokens for the connected Microsoft account are stored securely and refreshed automatically.
- Each user/tenant has their own credential; the MCP sends the appropriate credential ID with each request so calls are isolated per connection.
- On disconnect, that credential is no longer used and OneDrive tools will not be available for that user until they reconnect OneDrive.
Required scopes
Alternatively, Files.ReadWrite (full read/write) can be used; only read and export are used by the current tools.
Scope justification
| Scope | Purpose |
|---|
| Files.Read | List folder contents, search files, export document/PDF/text content, and save Excel content for analysis. |
Connection required: Users must connect OneDrive in Alysio before OneDrive tools work. If the connection is missing or expired, they may need to re-authorize in Settings → Integrations.
Export limits: Export has a 5MB file-size limit for inline content; larger files return a download URL. For Excel, use onedrive_save_excel_file_content (not export) so it can be analyzed with execute_sql_query.
The OneDrive MCP exposes the following tools. Users can invoke these capabilities through natural language in Alysio.
| Tool | Description | Example user prompts |
|---|
onedrive_list_files | Lists files and folders in the OneDrive root or a given folder, with optional pagination, sort, and filter. | ”What’s in my OneDrive root?”, “List files in this folder.” |
onedrive_search_files | Searches OneDrive for files and folders matching a keyword (required q parameter). | ”Find files about QBR”, “Search my OneDrive for the proposal.” |
onedrive_export_file_content | Exports the content of a file by item ID; supports Office docs, PDF, text, and other types; 5MB limit for inline content. | ”Get the text from this Word doc”, “Export the content of this PDF.” |
onedrive_save_excel_file_content | Saves an Excel file’s content by item ID to a table (for use with execute_sql_query); requires a simple name and optional sheet(s). | ”Save this spreadsheet so we can analyze it”, “Load this Excel file and make it queryable.” |
App Behavior
- API calls are made on-demand only when the user asks something that requires OneDrive data or content (e.g. list, search, export, save Excel). There is no background sync; each request triggers the relevant Microsoft Graph (OneDrive) API call using the user’s OAuth credential.
Example flow
- User asks: “Find the sales deck in my OneDrive.”
- Alysio routes the request to the OneDrive MCP.
- The MCP calls
onedrive_search_files with a query (e.g. “sales deck”).
- The request is sent to the Microsoft Graph API using the user’s stored OAuth credential.
- The MCP returns the matching files (with IDs and webUrl); Alysio presents the results and can follow up with export or save Excel if the user asks.
Troubleshooting
Common issues
- Missing or expired connection — User sees errors or no OneDrive data. Fix: Reconnect OneDrive in Settings → Integrations (re-authorize with Microsoft).
- 401 Unauthorized — Token invalid or revoked. Fix: Re-authorize the integration in Settings → Integrations.
- 403 Forbidden — Often due to insufficient OAuth scopes. Fix: Ensure the OneDrive integration has the required scope (e.g.
Files.Read).
- 400 Invalid query — Special characters or invalid
$select/$orderby in list or search. Fix: Simplify the search term and avoid special characters; verify OData parameter syntax.
- File size limitation — Export returns inline content only for files ≤5MB. Fix: For larger files, the tool returns a
downloadUrl; use that link to open or download in the browser. For Excel analysis, use onedrive_save_excel_file_content with the file’s item ID.
- Save Excel requires DuckDB —
onedrive_save_excel_file_content is intended to be followed by execute_sql_query for analysis. Fix: Ensure the user flow asks Alysio to analyze the saved data with SQL if that’s the goal.
Support