One drive Integration for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with One drive MCP or direct API to find files, upload and organize documents, share folders, and collaborate in real time through natural language.
One drive Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools and Triggers

Tools
Triggers
Copy ItemTool to copy a driveitem (file or folder) to a new location asynchronously.
Create Sharing LinkTool to create a sharing link for a driveitem (file or folder) by its unique id.
Delete ItemTool to delete a driveitem (file or folder) by its unique id from the authenticated user's onedrive.
Download a fileDownloads a file from a user's onedrive using its item id, which must refer to a file and not a folder.
Get DriveRetrieves the properties and relationships of a drive resource by its unique id.
Get Item MetadataRetrieves the metadata of a driveitem by its unique id.
Get Item PermissionsRetrieves the permissions of a driveitem by its unique id or path within a specific drive.
Get Item ThumbnailsTool to retrieve the thumbnails associated with a driveitem.
Get Item VersionsTool to retrieve the version history of a driveitem by its unique id.
Get Drive QuotaTool to retrieve the quota information for the authenticated user's onedrive.
Get Recent ItemsRetrieves a list of items that have been recently used by the authenticated user.
Get Shared ItemsTool to retrieve a list of items that have been shared with the authenticated user.
Get SharePoint List ItemsTool to get the items (list items) within a specific sharepoint list on a site.
Get Site DetailsRetrieves metadata for a specific sharepoint site by its id.
Get SharePoint Site Page ContentGets the content of a modern sharepoint site page.
Invite User to Drive ItemTool to invite users or grant permissions to a specific item in a onedrive drive.
List Drive Item ActivitiesTool to list recent activities for a specific item in a onedrive drive.
List DrivesTool to retrieve a list of drive resources available to the authenticated user, or for a specific user, group, or site.
List Root Drive ChangesTool to list changes in the root of the user's primary drive using a delta token.
List SharePoint List Items DeltaTool to track changes to items in a sharepoint list using a delta query.
List Site ColumnsTool to list all column definitions for a sharepoint site.
List Site Drive Items DeltaTool to track changes to driveitems in the default document library of a sharepoint site.
List Site ListsTool to list all lists under a specific sharepoint site.
List Site SubsitesTool to list all subsites of a sharepoint site.
List SubscriptionsTool to list the current subscriptions for the authenticated user or app.
Move ItemTool to move a file or folder to a new parent folder in onedrive.
Create folderCreates a new folder in the user's onedrive, automatically renaming on conflict, optionally within a specified parent folder (by id or full path from root) which, if not the root, must exist and be accessible.
Create a new text fileCreates a new text file with specified content in a onedrive folder, using either the folder's unique id or its absolute path (paths are automatically resolved to ids); note that onedrive may rename or create a new version if the filename already exists.
Find ItemNon-recursively finds an item (file or folder) in a specified onedrive folder; if `folder` is provided as a path, it must actually exist.
Find FolderFinds folders by name within an accessible parent folder in onedrive, or lists all its direct child folders if no name is specified.
List OneDrive itemsRetrieves all files and folders as `driveitem` resources from the root of a specified user's onedrive, automatically handling pagination.
Upload fileUploads a file to a specified onedrive folder, automatically renaming on conflict and supporting large files via chunking.
Preview Drive ItemGenerates or retrieves a short-lived embeddable url for a preview of a specific item.
Search ItemsSearches for driveitems in onedrive that match the specified query.
Update Drive Item MetadataTool to update the metadata of a specific item (file or folder) in onedrive.

Connect One drive MCP Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to One drive tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Download the latest project report file from OneDrive')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Connect One drive API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute One drive Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Find and download the latest project proposal file from my OneDrive.'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(result)
Get tools from Tool Router session and execute One drive actions with your Agent

Why Use Composio?

AI Native One drive Integration

  • Supports both One drive MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your One drive data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke One drive access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access One drive
  • Scoped, least privilege access to One drive resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use One drive with Composio?

No, you can get started immediately using Composio's built-in One drive app. For production, we recommend configuring your own OAuth credentials.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.