Skip to main content
Microsoft OneDrive Logo

OneDrive Toolset

Cloud files, sharing, and OneNote notebooks

ReadyMicrosoft 365

Overview

The OneDrive toolset lets AI agents work with files in Microsoft OneDrive (and other drives you can access through Microsoft Graph), including shared libraries, downloads, sharing with people, and basic OneNote notebook operations. It uses delegated OAuth (user consent) so actions run as the signed-in user.

Key Capabilities

  • Drives and browsing - List drives, open the root folder, list folders and files, and fetch item metadata
  • Search - Search within a drive by keyword; search across content shared with you
  • Shared with me - List and search files others have shared with you without needing a drive ID first
  • File and folder actions - Create folders, rename, move, and copy items (copy may complete asynchronously)
  • Sharing - Invite specific people by email with read, write, or owner roles
  • Content and links - Get short-lived download URLs; read file content (parsed text and structured output for many formats, subject to size limits)
  • New Word files - Create a new .docx in a folder, optionally with initial text content
  • OneNote - Create notebooks, sections, and pages; list sections and pages; read page HTML
Almost every operation that targets a specific drive needs a drive_id. Call get_drives first when the drive is unknown.

Available Tools

Drive and navigation

ToolDescription
get_drivesList drives you can use; call first when drive_id is unknown
get_driveGet metadata for one drive (for example quota and owner)
get_root_folderGet the root drive item for a drive
get_filesList files and folders under the drive root or a given folder_id
get_folder_childrenList items inside a specific folder
get_fileGet metadata for one file or folder by item_id

Search and shared content

ToolDescription
search_filesSearch a drive by name, content, or metadata
get_shared_with_meList items shared with you (no drive_id required)
search_shared_with_meSearch for a keyword across drives that have shared content with you

Organize, copy, and share

ToolDescription
create_folderCreate a folder under a parent (defaults to root)
rename_itemRename a file or folder; preserves the file extension when appropriate
move_itemMove an item to another folder; optional new name
copy_itemCopy an item into a destination folder, optionally on another drive or with a new name
share_itemShare with people by email (read, write, or owner), optional message and invitation options

Download and read content

ToolDescription
get_download_urlGet a short-lived @microsoft.graph.downloadUrl for a file
get_file_contentDownload file bytes and return parsed content (many text and Office-like formats; large files are rejected)

Create files and OneNote

ToolDescription
create_word_fileCreate a .docx under a parent folder (file_type must be word); optional content
create_onenote_notebookCreate a notebook with a display name
create_onenote_sectionAdd a section to a notebook identified by its web_url
create_onenote_pageAdd a page to a section by section_id, with optional HTML body
get_onenote_sectionsList sections for a notebook web_url
get_onenote_pagesList pages in a section
get_onenote_page_contentRead a page’s HTML by page_id

Configuration Guide

Step 1: Open App registrations from the Azure portal home

  1. Go to portal.azure.com and sign in.
  2. On the home page, find Azure services and click App registrations. You can also search the top bar for App registrations or open Microsoft Entra ID and choose App registrations from there.
Azure portal home with App registrations

Step 2: Start a new registration

On the App registrations page, click + New registration.
App registrations list with New registration

Step 3: Register the application

  1. Name: Enter a display name (for example, PipesHub OneDrive Toolset).
  2. Supported account types: Choose who can sign in—for example Accounts in any organizational directory and personal Microsoft accounts for broad support, or a single-tenant option if you only use your organization.
  3. Redirect URI: Use the Web redirect URI from the PipesHub Configure OneDrive (or Microsoft 365 files) dialog in toolset settings where OneDrive is set up—for example Workspace → Actions and the OneDrive toolset + Setup / Configure flow.
PipesHub Configure OneDrive dialog showing Redirect URI
  1. Click Register.
Register an application form in Azure

Step 4: Copy Application (client) ID and Directory (tenant) ID

On the Overview page for your app, copy:
  • Application (client) ID — used as Client ID in PipesHub.
  • Directory (tenant) ID — used as Tenant ID in PipesHub (or use common / leave blank per the toolset dialog if you want both work/school and personal accounts).
App registration Overview with client and tenant IDs
Use the Application (client) ID, not the Object ID. They are different values.

Step 5: Create a client secret

  1. In the left sidebar under Manage, open Certificates & secrets.
  2. On the Client secrets tab, click + New client secret.
  3. Add a description, choose an expiration, then click Add.
  4. Copy the secret value immediately — it is shown only once.
Certificates and secrets with new client secret
If you leave this page without copying the secret, you cannot read it again—create a new client secret instead.

Step 6: Add Microsoft Graph API permissions

  1. In the left sidebar, open API permissions.
  2. Click + Add a permissionMicrosoft GraphDelegated permissions.
  3. Add the permissions your agents need, for example:
PermissionDescription
Files.ReadWrite.AllRead, write, move, copy, search, and share files the user can reach
User.ReadRead the signed-in user’s profile
Notes.CreateCreate OneNote notebooks
Notes.ReadWriteRead and update OneNote notebooks, sections, and pages
offline_accessRefresh tokens for ongoing access
If users rely on SharePoint document libraries that appear as drives, you may also need delegated Sites permissions appropriate to your tenant (for example Sites.Read.All or Sites.ReadWrite.All). Start with the table above and add permissions if Graph returns authorization errors for specific drives.
The OneDrive toolset uses Delegated permissions so actions run as the signed-in user, not only as the application.
Microsoft Graph delegated API permissions for OneDrive
Click Grant admin consent for your organization (the button includes your tenant name) and confirm, so delegated permissions show as granted for the tenant (especially for permissions that require admin approval).
API permissions with Grant admin consent

Step 8: Configure the OneDrive toolset in PipesHub

  1. In PipesHub, go to WorkspaceActions (or the area where toolsets are configured for your workspace).
  2. Find OneDrive (or the Microsoft 365 files toolset that includes these tools) and open setup / configuration (+ Setup or Configure).
  3. Confirm the Redirect URI in the dialog matches the Web redirect URI you registered in Azure Step 3.
  4. Enter Client ID, Client Secret, and optionally Tenant ID (common or your tenant/domain per the form), then create or save the instance.
PipesHub OneDrive toolset configuration with Client ID, secret, and redirect URI

Step 9: Authenticate the toolset under Your actions

  1. Open Your actions (or the equivalent entry under Personal in the sidebar).
  2. Select your OneDrive instance and complete Authenticate with OAuth (Microsoft sign-in, then accept permissions).
OneDrive toolset OAuth sign-in and consent in PipesHub

Step 10: Add OneDrive to an agent

  1. Go to the Home page.
  2. Next to Agents, click + to create a new agent.
  3. Give the agent a name, drag the OneDrive toolset onto the canvas, connect it to the Agent node with your model and chat input/output, then create the agent.
Agent builder with a Microsoft 365 toolset connected

FAQ

AspectOneDrive ConnectorOneDrive Toolset
PurposeSync and index files for search in PipesHubLet agents browse, search, edit metadata, share, and read content through the API
Data FlowOne-way import into PipesHubTwo-way actions on live Microsoft 365 content
Auth TypeApplication permissions (admin consent), background syncDelegated permissions (user consent), per-user session
When to UseEnterprise search over file corporaInteractive tasks such as “find this file,” “move to Archive,” or “share with my team”
Example: Use the OneDrive Connector to ingest documents for semantic search. Use the OneDrive Toolset when the agent should list folders, search by keyword, copy files, or share a document while the user is signed in.

Usage Tips

Example: Find a document by name
Ask the agent to search your OneDrive for “Q3 roadmap” (it should resolve drive_id, then run search_files or browse folders as needed).
Example: Move a file into a folder
Ask to move “Budget.xlsx” into the “Archive” folder (the agent can search for IDs, then call move_item).
Example: Share read-only with a colleague
Ask to share a specific file with alice@contoso.com with view access.