Microsoft OneDrive
Microsoft OneDrive integration for browsing, searching, uploading, and managing files via Microsoft Graph
The Microsoft OneDrive integration lets your agents browse, search, upload, share, and manage files and folders in a connected Microsoft 365 account through the Microsoft Graph API.
Prerequisites
- A Microsoft 365 or personal Microsoft account with the OneDrive you want the agent to access.
- Permission to authorize third-party apps in your tenant. Some organizations require admin consent for the
Files.*scopes.
Setup
-
Open Integrations from the sidebar
-
Select Microsoft OneDrive from the catalog
-
Click Add Integration Config
-
Give the config a display name (e.g., "OneDrive — Ops").
-
Click Connect and complete the Microsoft sign-in.
-
In the OAuth scope picker, choose which Graph permissions to grant. Each scope is requested independently:
Scope Required for Recommended Read your files ( Files.Read)Browsing, searching, and reading your own files (read-only) Yes Edit your files ( Files.ReadWrite)Creating folders, uploading, sharing, deleting If the agent writes Read all shared files ( Files.Read.All)Reading files others shared with you Optional Edit all shared files ( Files.ReadWrite.All)Editing files others shared with you Optional Read user profile ( User.Read)Identifying the connected account Optional Stay connected ( offline_access)Background refresh so users aren't reprompted Yes Read-only tools accept either the read or the read/write scope — so you can grant the narrower
Files.Readwhen the agent never writes. -
Grant only what the agent actually needs — the OAuth picker lets you uncheck scopes you don't want exposed.
-
Save the config
Connection testing is available — click Test on the saved config to verify the credentials and granted scopes against Microsoft Graph before deploying.
Using in Your Agent
- Open your agent in Agent Studio and select an Agent Step
- Under Attached Integration Configurations, click Attach configuration and choose your config
- Attach OneDrive tools from the tools panel
- Tools are referenced as
onedrive.list_items,onedrive.search_items, etc.
Start at the drive root with item ID root, or jump straight to a known file with Get File or Folder by Path. get_item returns a temporary download URL in the @microsoft.graph.downloadUrl field.
Available Tools
| Tool | Description | Action Type |
|---|---|---|
list_items | List files and folders in a folder | ReadOnly |
get_item | Get file/folder metadata and download URL | ReadOnly |
get_item_by_path | Get a file or folder by its path | ReadOnly |
search_items | Search files by name or content | ReadOnly |
list_shared_with_me | List files shared with the account | ReadOnly |
create_folder | Create a folder | Reversible |
upload_text_file | Create or replace a small text file | Reversible |
create_share_link | Create a view/edit sharing link | Reversible |
delete_item | Delete a file or folder (to recycle bin) | Irreversible |