OneDrive
Overview
Section titled “Overview”OneDrive is Microsoft’s cloud storage solution enabling users to store, sync, and share files across devices, offering offline access, real-time collaboration, and enterprise-grade security. With the integration in SquadOS, your agents can manage files and folders, read and write Excel spreadsheets, control sharing permissions, and automatically respond to file creation, update, or deletion events in OneDrive.
- Official website: https://onedrive.live.com/
- Composio documentation: docs.composio.dev/toolkits/one_drive
Authentication
Section titled “Authentication”This tool uses OAuth 2.0 (OAUTH2) to connect.
You will need to authorize access to your Microsoft account. No manual credentials are required — the OAuth flow redirects to the Microsoft login page and requests the necessary permissions.
| Field | Required | Description |
|---|---|---|
| Microsoft account | Yes | Personal, work, or school account associated with the OneDrive to be connected. |
How to connect in SquadOS
Section titled “How to connect in SquadOS”- Go to Tools in the side menu (
/admin/tools). - Open the Available tab and search for
OneDrive. - Click the card to open the details modal and hit Connect.
- You’re taken to the secure connection page hosted by Composio, where you authorize access with your Microsoft account.
- Once done, you’re sent back to SquadOS with the account connected and the tool available for agents. (Connection-flow details in Organization Tools.)
Why am I getting 404 on ONE_DRIVE_DOWNLOAD_FILE for a shared file?
Section titled “Why am I getting 404 on ONE_DRIVE_DOWNLOAD_FILE for a shared file?”Items in “Shared” may be references to files stored in SharePoint, not actual files in the user’s OneDrive. These references can’t be downloaded via OneDrive endpoints.
To fix this, open the file’s location in OneDrive or SharePoint, choose “Copy to” then “My files” to create a copy in the user’s OneDrive, and download the copy. If you need programmatic access to SharePoint files, use the SharePoint APIs instead.
Available actions
Section titled “Available actions”Add Workbook Worksheet
Section titled “Add Workbook Worksheet”ONE_DRIVE_ADD_WORKBOOK_WORKSHEET
Adds a new worksheet to an existing Excel workbook in OneDrive or SharePoint. The worksheet is created with the specified name and appended to the end of the workbook’s worksheet collection. Use this action when you need to create a new sheet in an Excel file to organize data, add reports, or separate information into logical sections.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | Optional name for the new worksheet. If omitted, Excel determines the worksheet name. If a worksheet with this name already exists, the API will return an error. |
item_id | string | Yes | The unique identifier of the workbook item (Excel file) where the worksheet will be added. Must be a valid driveItem ID for an Excel workbook. Obtain from ONE_DRIVE_LIST_FOLDER_CHILDREN, ONE_DRIVE_SEARCH_ITEMS, or similar operations. |
drive_id | string | Yes | The unique identifier of the drive containing the workbook. Obtain from ONE_DRIVE_LIST_DRIVES or similar operations. |
session_id | string | No | Optional workbook session ID. Use this to add the worksheet in an existing Excel workbook session. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Check In Drive Item
Section titled “Check In Drive Item”ONE_DRIVE_CHECKIN_ITEM
Tool to check in a checked out driveItem resource, making the version of the document available to others. Use when you need to check in a file that was previously checked out in OneDrive or SharePoint.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
comment | string | No | A check-in comment that is associated with the version. |
drive_id | string | Yes | The unique identifier of the drive containing the item to check in. |
check_in_as | string | No | Optional. The status of the document after the check-in operation is complete. Can be ‘published’ or unspecified. |
drive_item_id | string | Yes | The unique identifier of the driveItem to check in. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Checkout Drive Item
Section titled “Checkout Drive Item”ONE_DRIVE_CHECKOUT_ITEM
Tool to check out a driveItem to prevent others from editing it and make your changes invisible until checked in. Use when you need to lock a file for exclusive editing in SharePoint or OneDrive.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | The unique identifier of the drive containing the item to checkout. |
drive_item_id | string | Yes | The unique identifier of the driveItem (file or folder) to checkout. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Copy Item
Section titled “Copy Item”ONE_DRIVE_COPY_ITEM
Tool to copy a DriveItem (file or folder) to a new location asynchronously. Use when you need to duplicate an item, optionally renaming it or specifying a different parent folder. The operation is asynchronous; the response provides a URL to monitor the copy progress. Do not assume the copy is complete immediately; verify via ONE_DRIVE_GET_ITEM or by listing the destination, especially for large folder trees.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The new name for the copied item. If not provided, the same name as the original is used. Recommended to provide either ‘name’ or ‘parent_reference’ for reliable operation. |
item_id | string | Yes | The ID of the DriveItem to be copied. |
site_id | string | No | The ID of the site if the item is in a SharePoint site. |
user_id | string | No | The ID of the user if accessing another user’s drive. |
drive_id | string | No | The ID of the drive where the item is located. If not provided, ‘me’ (user’s default drive) is assumed. |
group_id | string | No | The ID of the group if the item is in a group drive. |
children_only | boolean | No | If set to true, only the children of the source driveItem (if it’s a folder) are copied, not the driveItem itself. Defaults to false. Cannot be used with name parameter. |
parent_reference | object | No | Reference to the parent item (folder) where the copy will be created. If not provided, the item is copied to the same location. Must use stable OneDrive item IDs (not paths or names). Expected keys: driveId and id. |
conflict_behavior | string | No | Specifies how to handle a naming conflict if an item with the same name already exists in the destination. ‘fail’ (default), ‘replace’, or ‘rename’. |
include_all_version_history | boolean | No | If set to true, the version history of the source file is copied to the destination. Defaults to false. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Create Drive Item Permission
Section titled “Create Drive Item Permission”ONE_DRIVE_CREATE_ITEM_PERMISSION
Tool to create a new permission on a OneDrive drive item. Use when you need to grant application or SharePoint group permissions to a file or folder. This endpoint supports creating application permissions and SharePoint site group permissions only.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
roles | array | Yes | Array of Microsoft Graph role strings to assign to the permission. Documented/common values include read, write, and owner for SharePoint/OneDrive for Business permission resources. |
drive_id | string | Yes | The unique identifier of the drive. |
drive_item_id | string | Yes | The unique identifier of the drive item. |
granted_to_v2 | object | Yes | The identity to grant permission to. Must contain either application or siteGroup property. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Create Sharing Link
Section titled “Create Sharing Link”ONE_DRIVE_CREATE_LINK
Tool to create a sharing link for a DriveItem (file or folder) by its unique ID. Use when you need to generate a shareable link for an item in OneDrive or SharePoint.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | The type of sharing link to create. Valid values: view, edit, embed. |
scope | string | No | The scope of the link to create. If not specified, the default link type for the organization is created. Valid values: view, edit, organization, anonymous. Use organization to restrict to internal users; anonymous exposes content to anyone with the link. Tenant policies may block or downgrade certain scopes. |
item_id | string | Yes | The unique identifier of the drive item (file or folder) for which to create the link. Some item types cannot be shared; if sharing fails with ‘notSupported’ error, verify the item type supports sharing. |
site_id | string | No | The unique identifier of the site. Use this if the item is in a SharePoint site’s drive. |
user_id | string | No | The unique identifier of the user. Use this if the item is in another user’s drive. |
drive_id | string | No | The unique identifier of the drive. If not provided, the link will be created in the current user’s drive (me/drive). |
group_id | string | No | The unique identifier of the group. Use this if the item is in a group’s drive. |
password | string | No | The password for the sharing link. Optional and OneDrive Personal only. |
recipients | array | No | A list of recipients for the sharing link. Required when scope is ‘users’. Each recipient should be a dict with an ‘email’ key. |
expiration_date_time | string | No | The expiration date and time for the permission, in yyyy-MM-ddTHH:mm:ssZ format. Must be a future UTC timestamp. |
retain_inherited_permissions | boolean | No | If true (default), existing inherited permissions are retained. If false, all existing permissions are removed when sharing for the first time. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Item
Section titled “Delete Item”ONE_DRIVE_DELETE_ITEM
Tool to delete a DriveItem (file or folder) by its unique ID from the authenticated user’s OneDrive. This action moves the item to the recycle bin, not permanently deleting it; storage quota is not freed until the recycle bin is emptied. Bulk deletions can trigger 429 (rate limit) or 5xx responses — limit concurrency and use exponential backoff.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the DriveItem (file or folder) to be deleted. |
user_id | string | No | The user’s ID, email, or ‘me’. Defaults to ‘me’ (authenticated user). Required for S2S (app-only) auth. |
drive_id | string | No | The unique identifier of the Drive where the item is located. If not provided, the action will target the user’s personal OneDrive (me/drive). Always specify drive_id explicitly for group drives, SharePoint site drives, or shared libraries. |
if_match | string | No | If this request header is included and the eTag (or cTag) provided doesn’t match the current tag on the item, a 412 Precondition Failed response is returned, and the item won’t be deleted. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Permanently Delete Drive Item
Section titled “Permanently Delete Drive Item”ONE_DRIVE_DELETE_ITEM_PERMANENTLY
Tool to permanently delete a driveItem by its ID without moving it to the recycle bin. Use when you need to irreversibly remove a file or folder from OneDrive or SharePoint. This action cannot be undone.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the drive item (file or folder) to permanently delete. This action deletes the item without moving it to the recycle bin and cannot be undone. |
drive_id | string | Yes | The unique identifier of the drive containing the item to permanently delete. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Drive Item Permission
Section titled “Delete Drive Item Permission”ONE_DRIVE_DELETE_ITEM_PERMISSION
Tool to delete a permission from a drive item. Use when you need to revoke sharing access to a file or folder. Only non-inherited sharing permissions can be deleted.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the drive item (file or folder). |
perm_id | string | Yes | The unique identifier of the permission to delete. Only non-inherited sharing permissions can be deleted. |
site_id | string | No | The unique identifier of a SharePoint site. Use this if the item is in a SharePoint site’s drive. |
user_id | string | No | The unique identifier of a user. Use this if the item is in a specific user’s drive (other than ‘me’). |
drive_id | string | No | The unique identifier of the drive. If not provided, the action will target the user’s personal OneDrive (me/drive). |
group_id | string | No | The unique identifier of the group. Use this if the item is in a group’s drive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Shares Permission
Section titled “Delete Shares Permission”ONE_DRIVE_DELETE_SHARE_PERMISSION
Tool to delete the permission navigation property for a shared drive item. Use when you need to remove a sharing link permission. This effectively revokes access via the specific share link.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
shared_drive_item_id | string | Yes | The share ID or base64-encoded sharing URL. This is the shareId returned from the createLink API response. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Workbook Range
Section titled “Delete Workbook Range”ONE_DRIVE_DELETE_WORKBOOK_RANGE
Deletes a range of cells from a worksheet in an Excel workbook stored in OneDrive. Use this action when you need to remove a specific cell range and shift the remaining cells to fill the gap. This action is irreversible. The operation requires Files.ReadWrite scope and the workbook must not be locked by another user or process.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
range | string | Yes | The address of the range to delete in A1 notation. Can be a single cell (e.g., ‘A1’) or a range of cells (e.g., ‘A1:D4’). The range must be valid for the worksheet. |
shift | string | Yes | The direction to shift remaining cells after deletion. ‘Up’ shifts cells upward to fill the gap, ‘Left’ shifts cells leftward. |
item_id | string | Yes | The unique identifier of the Excel workbook item. This is the driveItem ID of the .xlsx file containing the worksheet. |
drive_id | string | Yes | The unique identifier of the drive containing the workbook. |
worksheet | string | Yes | The name or ID of the worksheet containing the range to delete. Can be the worksheet name (e.g., ‘Sheet1’) or the worksheet ID. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Workbook Worksheet
Section titled “Delete Workbook Worksheet”ONE_DRIVE_DELETE_WORKBOOK_WORKSHEET
Deletes a worksheet from a workbook in OneDrive by its ID or name. Use this action when you need to remove a specific worksheet from an Excel workbook stored in OneDrive or SharePoint. This action is irreversible. Note that deleting the last visible worksheet in a workbook may result in an error.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The ID of the workbook item (Excel file). |
drive_id | string | Yes | The ID of the drive containing the workbook. |
session_id | string | No | Optional workbook session ID. If provided, will be sent in the ‘workbook-session-id’ header to maintain session context. |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet to delete from the workbook. Can be either the worksheet’s unique identifier or its display name (e.g., ‘Sheet1’). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Discard Checkout
Section titled “Discard Checkout”ONE_DRIVE_DISCARD_CHECKOUT
Tool to discard the checkout of a driveItem, releasing it and discarding any changes made while checked out. Use when you need to cancel a checkout and revert changes on a file in SharePoint or OneDrive.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | The unique identifier of the drive containing the item to discard checkout. |
drive_item_id | string | Yes | The unique identifier of the driveItem (file or folder) to discard checkout. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Download a file
Section titled “Download a file”ONE_DRIVE_DOWNLOAD_FILE
Downloads a file from a user’s OneDrive using its item ID, which must refer to a file and not a folder. Response contains a content object with fields: s3url (URL to fetch raw file bytes), mimetype, and name; raw file data is not returned directly. Parsing content from Excel, Word, PDF, or other formats requires additional tooling. The response also includes attachment.s3key, required when passing this file to downstream tools such as OUTLOOK_SEND_EMAIL or OUTLOOK_CREATE_DRAFT.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
format | string | No | Optional format for file conversion during download. ‘pdf’ converts supported source files to PDF. ‘html’ converts Loop/Fluid files to HTML. Leave empty to download the file in its original format without conversion. Do NOT use this parameter if the file is already in the target format. |
item_id | string | Yes | Raw item ID only (e.g., ‘1234567890ABC’). Do not include URL fragments or query parameters like ‘&cid=…’ or ‘?param=…’ from sharing links. |
user_id | string | No | User’s ID or User Principal Name (UPN), or ‘me’ for the authenticated user’s OneDrive. Ignored when drive_id is provided. |
drive_id | string | No | The ID of the drive containing the file. Required for SharePoint or OneDrive for Business drives. When provided, user_id is ignored. |
file_name | string | Yes | Desired filename (including extension) for the downloaded content. |
if_none_match | string | No | Optional ETag or cTag value for conditional download. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Download file by path
Section titled “Download file by path”ONE_DRIVE_DOWNLOAD_FILE_BY_PATH
Downloads the contents of a file from OneDrive by its path. The API returns a 302 redirect to a pre-authenticated download URL. Use when you know the file path but not the item ID.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | No | The user’s ID, email, or ‘me’. Defaults to ‘me’ (authenticated user). Required for S2S (app-only) auth. |
file_name | string | Yes | Desired filename (including extension) for the downloaded content. |
item_path | string | Yes | The path to the file in OneDrive, relative to the drive root (e.g., ‘document.txt’ or ‘folder/subfolder/file.pdf’). Do not include leading slash. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Download item as format
Section titled “Download item as format”ONE_DRIVE_DOWNLOAD_ITEM_AS_FORMAT
Tool to download the contents of a driveItem converted to a specific format (e.g., PDF or HTML). Use when you need to convert Office documents to PDF or Loop/Fluid files to HTML before downloading.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
format | string | Yes | Format to convert the item to. Use ‘pdf’ for Office documents or ‘html’ for Loop/Fluid files. |
item_id | string | No | The unique identifier of the driveItem to convert. If provided, this takes precedence over path_and_filename. |
user_id | string | No | User’s ID or UPN, or ‘me’ for the authenticated user’s OneDrive. Ignored when drive_id is provided. |
drive_id | string | No | The unique identifier of the drive. Optional - use for SharePoint document libraries. |
file_name | string | Yes | Desired filename (including extension) for the downloaded converted content. |
path_and_filename | string | No | Path and filename of the driveItem under root (e.g., ‘Documents/report.docx’). Do not include leading slash. Either item_id or path_and_filename must be provided. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Download Drive Item Version Content
Section titled “Download Drive Item Version Content”ONE_DRIVE_DOWNLOAD_ITEM_VERSION
Tool to download the contents of a specific previous version of a drive item (file). Returns the actual file content. Note: You cannot download the current version using this endpoint - it only works for previous versions.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the drive item (file). Cannot be a folder ID. |
drive_id | string | No | The unique identifier of the drive containing the file. If not provided, defaults to the user’s personal OneDrive (me/drive). |
file_name | string | Yes | Desired filename (including extension) for the downloaded version content. |
version_id | string | Yes | The ID of the specific version to download (e.g., ‘1.0’, ‘2.0’). Cannot be the current version - only previous versions can be downloaded using this endpoint. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Follow Drive Item
Section titled “Follow Drive Item”ONE_DRIVE_FOLLOW_ITEM
Tool to follow a driveItem (file or folder) in OneDrive or SharePoint. Use when you need to add an item to the user’s followed items list for tracking updates.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | The unique identifier of the drive containing the item to follow. |
driveItem_id | string | Yes | The unique identifier of the driveItem (file or folder) to follow. DriveItem IDs are case-sensitive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Drive
Section titled “Get Drive”ONE_DRIVE_GET_DRIVE
Retrieves the properties and relationships of a Drive resource by its unique ID. Use this action when you need to get details about a specific OneDrive, user’s OneDrive, group’s document library, or a site’s document library. Only drives accessible to the authenticated user are returned.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | The unique identifier of the drive. Use ONE_DRIVE_LIST_DRIVES to obtain valid drive IDs. |
expand_fields | array | No | A comma-separated list of relationships to expand and include in the response. |
select_fields | array | No | A comma-separated list of properties to include in the response. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get DriveItem by Sharing URL
Section titled “Get DriveItem by Sharing URL”ONE_DRIVE_GET_DRIVE_ITEM_BY_SHARING_URL
Tool to resolve a OneDrive/SharePoint sharing URL (or shareId) to a DriveItem with driveId and itemId. Use when you have a sharing link from Teams, chat, or 1drv.ms and need the item’s metadata or IDs for downstream actions like permissions or download.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
sharing_url | string | No | A OneDrive or SharePoint sharing URL (e.g., 1drv.ms link, SharePoint link, or Teams contentUrl). Mutually exclusive with share_id_or_encoded_url. |
prefer_redeem | string | No | Controls access redemption. ‘redeemSharingLink’ grants durable access to the item. ‘redeemSharingLinkIfNecessary’ grants access only for this request. |
select_fields | array | No | A list of DriveItem properties to return. |
expand_children | boolean | No | If true and the item is a folder, expands the children collection to include child items in the response. |
share_id_or_encoded_url | string | No | An already-encoded sharing token (prefixed with ‘u!’) or a shareId token from a previous API call. Mutually exclusive with sharing_url. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Drives Following
Section titled “Get Drives Following”ONE_DRIVE_GET_FOLLOWED_ITEM
Tool to retrieve a specific followed driveItem from a drive. Use when you need to get details about a file or folder that the user has marked to follow.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
drive_id | string | Yes | The unique identifier of the drive. |
driveItem_id | string | Yes | The unique identifier of the followed driveItem to retrieve. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Group Drive
Section titled “Get Group Drive”ONE_DRIVE_GET_GROUP_DRIVE
Tool to retrieve the document library (drive) for a Microsoft 365 group. Use when you need to access the default document library associated with a specific group.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
group_id | string | Yes | The unique identifier of the group whose document library you want to retrieve. |
select_fields | array | No | A list of properties to include in the response. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Item Metadata
Section titled “Get Item Metadata”ONE_DRIVE_GET_ITEM
Retrieves the metadata of a DriveItem by its unique ID. Use this tool to get information about a specific file or folder in OneDrive when you have its ID. If a drive_id is not provided, it defaults to the user’s main drive.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the DriveItem (file or folder). IDs are case-sensitive and must be used exactly as returned from Microsoft Graph API. Obtain IDs from ONE_DRIVE_LIST_FOLDER_CHILDREN, ONE_DRIVE_SEARCH_ITEMS, or similar operations. |
drive_id | string | No | The unique identifier of the Drive where the item is located. If not provided, the action will target the user’s personal OneDrive (me/drive). |
select_fields | array | No | A list of DriveItem properties to return. |
expand_relations | array | No | Navigation properties to expand in the response. Valid values: ‘children’, ‘thumbnails’, ‘versions’, ‘permissions’, ‘listItem’, ‘activities’, ‘analytics’, etc. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Item Permissions
Section titled “Get Item Permissions”ONE_DRIVE_GET_ITEM_PERMISSIONS
Retrieves the permissions of a DriveItem by its unique ID within a specific Drive. Use when you need to check who has access to a file or folder and what level of access they have.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
select | string | No | A comma-separated list of properties to include in the response. For example, ‘id,roles,link’. |
item_id | string | No | The unique identifier of the drive item. Required unless item_path is provided. |
site_id | string | No | The unique identifier of a SharePoint site. |
user_id | string | No | The unique identifier of a user. |
drive_id | string | No | The unique identifier of the drive. |
group_id | string | No | The unique identifier of a group. |
item_path | string | No | The path to the item relative to the drive’s root. Must start with ’:/’ and end with ’:/’. |
if_none_match | string | No | If this request header value (etag) matches the current etag on the item, an HTTP 304 Not Modified response is returned. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Item Thumbnails
Section titled “Get Item Thumbnails”ONE_DRIVE_GET_ITEM_THUMBNAILS
Tool to retrieve the thumbnails associated with a DriveItem. Use when you need to display visual previews of files. Thumbnails may not be generated for all file types or newly uploaded items.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
select | string | No | A comma-separated list of thumbnail sizes to retrieve (e.g., “small,medium,large”). |
item_id | string | Yes | The unique identifier of the DriveItem. |
site_id | string | No | The unique identifier of a Site. |
user_id | string | No | The unique identifier of a User. |
drive_id | string | No | The unique identifier of the Drive. If not provided, ‘me’ will be used for the current user’s drive. |
group_id | string | No | The unique identifier of a Group. |
original_orientation | boolean | No | If true, retrieves the thumbnail with its original EXIF orientation. This is only supported on OneDrive Personal. Defaults to false. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Item Versions
Section titled “Get Item Versions”ONE_DRIVE_GET_ITEM_VERSIONS
Tool to retrieve the version history of a DriveItem by its unique ID. Use when you need to access or list previous versions of a file.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
item_id | string | Yes | The unique identifier of the item (file or folder). |
site_id | string | No | The unique identifier of the site. Mutually exclusive with drive_id, group_id, and user_id. |
user_id | string | No | The unique identifier of the user. Mutually exclusive with drive_id, group_id, and site_id. |
drive_id | string | No | The unique identifier of the drive. Mutually exclusive with group_id, site_id, and user_id. |
group_id | string | No | The unique identifier of the group. Mutually exclusive with drive_id, site_id, and user_id. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Recent Items
Section titled “Get Recent Items”ONE_DRIVE_GET_RECENT_ITEMS
Get files and folders recently accessed by the user. Returns items based on activity history (opened, edited, viewed), sorted by most recent first. Use when you need to see what the user worked on recently.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of recent items to return (1-200). |
select | string | No | Comma-separated list of properties to include in the response. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Drive Root Folder
Section titled “Get Drive Root Folder”ONE_DRIVE_GET_ROOT
Tool to retrieve metadata for the root folder of the signed-in user’s OneDrive. Use when you need information about the user’s OneDrive root directory, such as size, child count, or web URL.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | No | The user’s ID, email, or ‘me’. Defaults to ‘me’ (authenticated user). Required for S2S (app-only) auth. |
select_fields | array | No | A list of properties to include in the response. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Shared Item by ShareId
Section titled “Get Shared Item by ShareId”ONE_DRIVE_GET_SHARE
Tool to access a shared DriveItem or collection of shared items using a shareId or encoded sharing URL. Returns the sharedDriveItem resource with metadata about the shared item and its owner.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
prefer_redeem | string | No | Controls access redemption. ‘redeemSharingLink’ grants durable access to the item (permanent permission). ‘redeemSharingLinkIfNecessary’ grants access only for this request (temporary). |
expand_children | boolean | No | If true and the shared item is a folder, expands the children collection to include child items. |
share_id_or_encoded_sharing_url | string | Yes | A sharing token (shareId) as returned by the API or a properly encoded sharing URL. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Shared Items
Section titled “Get Shared Items”ONE_DRIVE_GET_SHARED_ITEMS
Tool to retrieve items shared with the authenticated user (not items the user has shared with others). Returns files and folders shared with the current user.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
allow_external | boolean | No | Set to true to include items shared from external tenants. Defaults to false, which only returns items shared within the user’s own tenant. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get SharePoint List Items
Section titled “Get SharePoint List Items”ONE_DRIVE_GET_SHAREPOINT_LIST_ITEMS
Tool to get the items (list items) within a specific SharePoint list on a site. Use when you need to retrieve data from a SharePoint list.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return in a single response. |
skip | integer | No | The number of items to skip in the result set. |
count | boolean | No | If true, returns the total count of items in the @odata.count property. |
expand | string | No | A comma-separated list of relationships to expand. Use ‘fields($select=columnName1,columnName2)’ to retrieve specific fields. |
filter | string | No | An OData filter query to restrict the results. |
select | string | No | A comma-separated list of properties to include in the response. |
list_id | string | Yes | The unique identifier of the list within the SharePoint site. |
orderby | string | No | OData order by expression to sort results. |
site_id | string | Yes | The unique identifier of the SharePoint site. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Site Details
Section titled “Get Site Details”ONE_DRIVE_GET_SITE
Retrieves metadata for a specific SharePoint site by its ID. Use this action when you need to get details like display name, web URL, and creation/modification dates for a known SharePoint site.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
expand | string | No | Comma-separated list of relationships to expand in the response. Example: columns,lists,drives |
select | string | No | Comma-separated list of properties to include in the response. Example: id,displayName,webUrl |
site_id | string | Yes | The unique identifier of the SharePoint site. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get SharePoint Site Page Content
Section titled “Get SharePoint Site Page Content”ONE_DRIVE_GET_SITE_PAGE_CONTENT
Gets the content of a modern SharePoint site page. Use when you need to retrieve the details and content of a specific page within a SharePoint site.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
expand | string | No | Expands related entities. For example, use ‘canvasLayout’ to include the page’s layout and web part content. |
select | string | No | Comma-separated list of properties to include in the response. Example: id,name,title |
page_id | string | Yes | The unique identifier of the site page. |
site_id | string | Yes | The unique identifier of the SharePoint site. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Drive Special Folder
Section titled “Get Drive Special Folder”ONE_DRIVE_GET_SPECIAL_FOLDER
Tool to retrieve a special folder in OneDrive by name. Use when you need to access well-known folders (documents, photos, approot, etc.) without looking up by path or ID.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | No | The user’s ID, email, or ‘me’. Defaults to ‘me’ (authenticated user). Required for S2S (app-only) auth. |
select_fields | array | No | A list of properties to include in the response. |
expand_relations | array | No | Navigation properties to expand in the response. |
special_folder_name | string | Yes | The name of the special folder to retrieve. Valid values: ‘documents’, ‘photos’, ‘cameraroll’, ‘approot’, ‘music’, ‘recordings’. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get User Profile
Section titled “Get User Profile”ONE_DRIVE_GET_USER
Retrieves the properties and profile information for a specific Microsoft user by their user ID or user principal name. This action requires the User.Read or User.ReadBasic.All OAuth scope to access user profile data.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
select | array | No | Specific properties to return in the response. |
user_id | string | Yes | The user principal name (UPN) or user ID to retrieve. Examples: ‘user@contoso.com’ or ‘87d349ed-44d7-43e1-9a83-5f2406dee5bd’. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Get Workbook Worksheet
Section titled “Get Workbook Worksheet”ONE_DRIVE_GET_WORKBOOK_WORKSHEET
Retrieves a specific worksheet from an Excel workbook stored in OneDrive or SharePoint using Microsoft Graph API. Use this action when you need to get details about a particular worksheet, including its ID, name, position, and visibility.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
select | string | No | Comma-separated list of properties to select (e.g., ‘id,name,position’). |
item_id | string | Yes | The ID of the workbook item (Excel file). |
drive_id | string | Yes | The ID of the drive containing the workbook. |
session_id | string | No | Optional workbook session ID. |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet to retrieve. Will be URL-encoded automatically. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Grant Shares Permission
Section titled “Grant Shares Permission”ONE_DRIVE_GRANT_SHARE_PERMISSION
Tool to grant users access to a link represented by a permission using an encoded sharing URL. Use when you need to give specific users access to a shared OneDrive or SharePoint resource.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
roles | array | Yes | Array of Microsoft Graph role strings specifying the access level to grant. Common values: ‘read’ and ‘write’. |
recipients | array | Yes | Array of recipient objects with email addresses who will receive access to the shared link. |
encoded_sharing_url | string | Yes | Base64url encoded sharing URL (must be prefixed with u!). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Invite User to Drive Item
Section titled “Invite User to Drive Item”ONE_DRIVE_INVITE_USER_TO_ITEM
Tool to invite users or grant permissions to a specific item in a OneDrive drive. Use when you need to share a file or folder with other users and define their access level (e.g., read or write).
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
roles | array | Yes | Specifies the roles to be granted to the recipients. Common values: ‘read’ and ‘write’. |
item_id | string | Yes | The unique identifier of the drive item (file or folder). |
message | string | No | A plain text formatted message that is included in the sharing invitation. Maximum length 2000 characters. |
site_id | string | No | The unique identifier of a SharePoint site. |
user_id | string | No | The unique identifier of a user. |
drive_id | string | No | The unique identifier of the drive. If not provided, the authenticated user’s personal drive will be used. |
group_id | string | No | The unique identifier of a Microsoft 365 group. |
password | string | No | The password set on the invite by the creator. Optional and OneDrive Personal only. |
recipients | array | Yes | A collection of recipients who will receive access and the sharing invitation. |
require_sign_in | boolean | No | Specifies whether the recipient is required to sign-in to view the shared item. |
send_invitation | boolean | No | If true, a sharing link is sent to the recipient. Otherwise, a permission is granted directly. |
expiration_date_time | string | No | Specifies the dateTime after which the permission expires. ISO 8601 format. |
retain_inherited_permissions | boolean | No | Optional. If true (default), any existing inherited permissions are retained on the shared item. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Drive Activities
Section titled “List Drive Activities”ONE_DRIVE_LIST_ACTIVITIES
Tool to retrieve recent activities on the authenticated user’s OneDrive. Use when you need to track recent changes or actions performed across the drive.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of activities to return. Must be between 1 and 999. |
drive_id | string | No | The ID of the drive to list activities for. If not provided, the default drive of the authenticated user will be used. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List All Drive Items Recursively
Section titled “List All Drive Items Recursively”ONE_DRIVE_LIST_ALL_DRIVE_ITEMS
Recursively lists all files and folders in a OneDrive drive by traversing the entire folder hierarchy. For large drives with thousands of items, this operation may take significant time.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
expand | string | No | Related entities to expand (e.g., ‘children’, ‘thumbnails’). |
select | array | No | Specific properties to return for each item. |
drive_id | string | Yes | The ID of the drive to list items from. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Drive Bundles
Section titled “List Drive Bundles”ONE_DRIVE_LIST_BUNDLES
Tool to retrieve a list of bundle resources from a specified drive. Bundles are collections of files (e.g., photo albums). Use when you need to list bundles in a drive.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return in a single page. Must be between 1 and 999. |
expand | string | No | Comma-separated list of relationships to expand. |
filter | string | No | OData filter query to filter bundles. For example, ‘bundle/album ne null’ to list only photo albums. |
select | string | No | Comma-separated list of properties to include in the response. |
orderby | string | No | A comma-separated list of properties to order the results by. |
drive_id | string | Yes | The unique identifier of the drive to list bundles from. |
skip_token | string | No | A token used to retrieve the next page of results. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Drives
Section titled “List Drives”ONE_DRIVE_LIST_DRIVES
Tool to retrieve a list of Drive resources available to the authenticated user, or for a specific user, group, or site. Use when you need to find out what drives are accessible.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return in a single page. Must be between 1 and 999. |
expand | string | No | Comma-separated list of relationships to expand. |
select | string | No | Comma-separated list of properties to include in the response. |
orderby | string | No | A comma-separated list of properties to order the results by. |
site_id | string | No | The ID of the site to list drives for. |
user_id | string | No | The ID of the user to list drives for. If none of group_id, site_id, or user_id are provided, the drives for the current authenticated user will be listed. |
group_id | string | No | The ID of the group to list drives for. |
skip_token | string | No | A token used to retrieve the next page of results. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Folder Children
Section titled “List Folder Children”ONE_DRIVE_LIST_FOLDER_CHILDREN
List the direct children (files/folders) of a OneDrive/SharePoint folder by DriveItem ID or path. Returns reliable pagination tokens/nextLink for large folders.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of items to return per page. Default is 200. |
expand | array | No | List of relationships to expand in the response. |
select | array | No | Comma-separated list of properties to include in the response. |
orderby | string | No | Sort results by specified properties. |
site_id | string | No | If provided, uses /sites/{site-id}/drive/… route for SharePoint sites. |
drive_id | string | No | The ID of the drive. Required unless using ‘use_me_drive’ or ‘site_id’ is provided. |
next_link | string | No | Full @odata.nextLink URL from a previous response for pagination continuation. |
skip_token | string | No | A $skipToken value from a previous response for pagination continuation. |
folder_path | string | No | Path relative to the drive root (e.g., ’/’, ‘/Recordings’, ‘/Documents/Project’). |
use_me_drive | boolean | No | If true, uses /me/drive/… route for the authenticated user’s personal OneDrive. |
folder_item_id | string | No | The ID of the folder (DriveItem) to list children from. Required unless ‘folder_path’ is provided. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Drive Item Activities
Section titled “List Drive Item Activities”ONE_DRIVE_LIST_ITEM_ACTIVITIES
Tool to list recent activities for a specific item in a OneDrive drive. Use when you need to track changes or actions performed on a file or folder.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Show only the first n items. |
skip | integer | No | Skip the first n items for pagination. |
expand | array | No | List of relationships to expand in the response. |
filter | string | No | OData filter expression to filter activities. |
select | array | No | Comma-separated list of properties to include in the response. |
item_id | string | Yes | The unique identifier of the driveItem. |
orderby | string | No | Sort results by specified properties. |
drive_id | string | Yes | The unique identifier of the drive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Root Drive Changes
Section titled “List Root Drive Changes”ONE_DRIVE_LIST_ROOT_DRIVE_CHANGES
Tool to list changes in the root of the user’s primary drive using a delta token. Use when you need to track file and folder modifications, additions, or deletions in the main OneDrive directory. First call without token returns all current items plus an @odata.deltaLink; store that token and pass it on subsequent calls to retrieve only incremental changes.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of items to return in a single response. |
token | string | No | Either a raw token string or a full URL from @odata.nextLink/@odata.deltaLink. Accepts: raw token value, full pagination URL, or ‘latest’ to get a token for future calls. Omit to get all current items. |
expand | string | No | Comma-separated list of relationships to expand in the response. |
select | string | No | Comma-separated list of DriveItem properties to include in the response. |
drive_id | string | No | The ID of the drive to track changes for. Required for application auth. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Shares Permission
Section titled “List Shares Permission”ONE_DRIVE_LIST_SHARE_PERMISSIONS
Tool to retrieve permission details for a shared OneDrive or SharePoint item using a share ID. Use when you have an encoded sharing URL and need to check the permission level and access details.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
shared_drive_item_id | string | Yes | The share ID (encoded sharing URL in format u!<base64url> or share token) to retrieve permission for. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List SharePoint List Items Delta
Section titled “List SharePoint List Items Delta”ONE_DRIVE_LIST_SHAREPOINT_LIST_ITEMS_DELTA
Tool to track changes to items in a SharePoint list using a delta query. Use when you need to get newly created, updated, or deleted list items without performing a full read of the entire item collection.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of items to return in a single response. |
token | string | No | If unspecified or empty, enumerates the current state. If ‘latest’, returns an empty response with the latest delta token. If a previous delta token, returns changes since that token. |
expand | string | No | Comma-separated list of relationships to expand. |
select | string | No | Comma-separated list of listItem properties to return. |
list_id | string | Yes | The unique identifier of the list within the site. |
site_id | string | Yes | SharePoint site ID in composite format: hostname,site-collection-guid,site-guid (three comma-separated parts). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Site Columns
Section titled “List Site Columns”ONE_DRIVE_LIST_SITE_COLUMNS
Tool to list all column definitions for a SharePoint site. Use this when you need to retrieve the schema or structure of columns within a specific SharePoint site.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return. |
skip | integer | No | The number of items to skip in the result set. |
count | boolean | No | If true, returns the total count of items in the @odata.count property. |
expand | string | No | Comma-separated list of related resources to expand in the response. |
filter | string | No | OData filter expression to apply to the results. |
select | string | No | Comma-separated list of properties to include in the response. |
orderby | string | No | Comma-separated list of properties used to sort the results. |
site_id | string | Yes | The unique identifier of the SharePoint site. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Site Drive Items Delta
Section titled “List Site Drive Items Delta”ONE_DRIVE_LIST_SITE_ITEMS_DELTA
Tool to track changes to DriveItems in the default document library of a SharePoint site. Use when you need to get a list of items that have been added, modified, or deleted since a previous state.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of items to return in a single response. |
token | string | No | A token used to retrieve a specific page of results or to get changes since a previous state. Can be ‘latest’, a deltaLink URL, or a timestamp (YYYY-MM-DDTHH:MM:SSZ). |
expand | string | No | Comma-separated list of relationships to expand in the response. |
select | string | No | Comma-separated list of DriveItem properties to include in the response. |
site_id | string | Yes | The unique identifier of the SharePoint site. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Site Lists
Section titled “List Site Lists”ONE_DRIVE_LIST_SITE_LISTS
Tool to list all lists under a specific SharePoint site. Returns only Microsoft Graph-supported lists — internal/system lists are excluded. IMPORTANT: Only works with organizational Microsoft 365 accounts (Azure AD/Entra ID). NOT supported for personal Microsoft accounts.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return. |
expand | string | No | Comma-separated list of relationships to expand in the response. Example: columns,items |
filter | string | No | OData filter expression. Example: startswith(name,‘Doc’) |
select | string | No | Comma-separated list of properties to include in the response. Example: id,name,list |
orderby | string | No | OData order by expression. Example: name asc |
site_id | string | Yes | SharePoint site ID in the required composite format: ‘hostname,site-collection-id,web-id’. Must contain exactly two commas separating three parts. Only works with organizational Microsoft 365 accounts. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Site Subsites
Section titled “List Site Subsites”ONE_DRIVE_LIST_SITE_SUBSITES
Tool to list all subsites of a SharePoint site. IMPORTANT: This action only works with organizational Microsoft 365 accounts (Azure AD/Entra ID accounts). It is NOT supported for personal Microsoft accounts. An empty value array in the response means the site has no subsites, not a failure.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | The maximum number of items to return. |
expand | string | No | Comma-separated list of relationships to expand in the response. |
filter | string | No | OData filter expression. Example: startswith(name,‘Project’) |
select | string | No | Comma-separated list of properties to include in the response. |
orderby | string | No | OData order by expression. |
site_id | string | Yes | The unique identifier of the SharePoint site for which to list subsites. Must be the full composite Graph ID in the format hostname,siteCollectionId,siteId. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Subscriptions
Section titled “List Subscriptions”ONE_DRIVE_LIST_SUBSCRIPTIONS
Tool to list the current subscriptions for the authenticated user or app. Use this to retrieve details of existing webhook subscriptions.
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List Workbook Worksheets
Section titled “List Workbook Worksheets”ONE_DRIVE_LIST_WORKBOOK_WORKSHEETS
Retrieves a list of all worksheets in an Excel workbook stored in OneDrive or SharePoint. Returns worksheet metadata including IDs, names, positions, and visibility states.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Optional maximum number of worksheets to return. |
skip | integer | No | Number of worksheets to skip before returning results. |
select | string | No | Comma-separated list of specific fields to return for each worksheet. |
item_id | string | Yes | The unique identifier of the workbook item (Excel file). |
drive_id | string | Yes | The unique identifier of the OneDrive or SharePoint drive containing the workbook. |
session_id | string | No | Optional workbook session ID. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Move Item
Section titled “Move Item”ONE_DRIVE_MOVE_ITEM
Tool to move a file or folder to a new parent folder in OneDrive. Use when you need to reorganize your files or folders by changing their location. You can optionally rename the item during the move. If a file with the same name exists at the destination, the API returns nameAlreadyExists.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The new name for the DriveItem. If not provided, the item retains its original name. |
itemId | string | Yes | The unique identifier of the file or folder (DriveItem) to be moved. |
siteId | string | No | The unique identifier of the site if the item is in a SharePoint site. |
userId | string | No | The unique identifier of the user if accessing another user’s drive. |
driveId | string | No | The unique identifier of the Drive that contains the item. If not specified, it defaults to the user’s personal drive (/me/drive). |
groupId | string | No | The unique identifier of the group if the item is in a group drive. |
description | string | No | The new description for the drive item. |
parentReference | object | Yes | An object specifying the destination folder. Must be provided as an object with an ‘id’ field containing the folder’s unique identifier. Format: {"id": "<folder-id>", "driveId": "<drive-id>"} (driveId is optional). |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Create folder
Section titled “Create folder”ONE_DRIVE_ONEDRIVE_CREATE_FOLDER
Creates a new folder in the user’s OneDrive with configurable conflict behavior, optionally within a specified parent_folder (by ID or full path from root) which, if not the root, must exist and be accessible.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The desired name for the new folder. If a folder with this name already exists in the specified parent_folder, the new folder will be automatically renamed. |
user_id | string | No | The user’s ID, email, or ‘me’. Defaults to ‘me’ (authenticated user). Required for S2S (app-only) auth. |
description | string | No | Optional description for the folder. |
parent_folder | string | No | ID or full path of the parent folder for the new folder. Paths must start from the root (e.g., ‘/Documents/Reports’). |
conflict_behavior | string | No | How Microsoft Graph should handle a folder name conflict. Use ‘fail’ to return an error, ‘rename’ to create a uniquely renamed folder, or ‘replace’ to replace the existing item when supported by Graph. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Create a new text file
Section titled “Create a new text file”ONE_DRIVE_ONEDRIVE_CREATE_TEXT_FILE
Creates a new plain-text file with specified content in the authenticated user’s personal OneDrive. All files are written as plain text regardless of extension — specifying .docx or .xlsx does not produce a true Office document. This action only works with the user’s personal OneDrive (/me/drive) and does not support SharePoint document libraries or shared drives.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The desired name for the new text file, including its extension (e.g., ‘report.txt’, ‘notes.log’). |
folder | string | No | The folder within the user’s personal OneDrive where the new text file will be created. Use ’/’ for root. |
content | string | Yes | The plain text content to be written into the new file. |
user_id | string | No | The user’s ID or the literal ‘me’ to represent the currently authenticated user. |
conflict_behavior | string | No | How to handle conflicts when a file with the same name already exists. ‘fail’ (default), ‘replace’, or ‘rename’. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Find Item
Section titled “Find Item”ONE_DRIVE_ONEDRIVE_FIND_FILE
Non-recursively finds an item (file or folder) in a specified OneDrive folder. For searches where the subfolder is unknown, use ONE_DRIVE_SEARCH_ITEMS instead.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The exact name of the file or folder to find within the specified folder. |
folder | string | No | The unique identifier (ID) or absolute path of the OneDrive folder for the search. For the root folder, use ’/’. |
user_id | string | No | The unique identifier of the user (e.g., a GUID) or the alias ‘me’ to represent the currently authenticated user. |
response_detail | string | No | Level of detail in the response. ‘minimal’ (default) returns only essential properties (id, name, webUrl). ‘full’ returns complete metadata. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Find Folder
Section titled “Find Folder”ONE_DRIVE_ONEDRIVE_FIND_FOLDER
Finds folders by name within an accessible parent folder in OneDrive, or lists all its direct child folders if no name is specified. Search is non-recursive: only immediate children of folder are checked.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum number of items to return in a single request. |
name | string | No | Exact name of the folder to find. If omitted, all direct child folders of the parent folder are returned. |
expand | string | No | Comma-separated list of relationships to expand in the response. |
folder | string | No | Path (e.g., ‘/My Files/Work’, ’/’ for root) or unique ID of the parent folder where child folders are searched. |
select | array | No | List of properties to include in the response. |
orderby | string | No | Sort results by specified properties. |
user_id | string | No | User’s unique identifier or ‘me’ for the authenticated user. |
skip_token | string | No | A $skipToken value from a previous response for pagination continuation. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
List OneDrive items
Section titled “List OneDrive items”ONE_DRIVE_ONEDRIVE_LIST_ITEMS
Retrieves all files and folders as driveItem resources from the root of a specified user’s OneDrive, automatically handling pagination. Non-recursive: returns only root-level items; subfolder contents require separate calls.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
top | integer | No | Maximum items per API request. The Microsoft Graph API may limit this. |
select | array | No | Specifies driveItem properties to return. |
user_id | string | No | User’s unique identifier or ‘me’ for the authenticated user’s OneDrive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Upload file
Section titled “Upload file”ONE_DRIVE_ONEDRIVE_UPLOAD_FILE
Uploads a file to a specified OneDrive folder, automatically creating the destination folder if it doesn’t exist, renaming on conflict, and supporting large files via chunking.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file | object | Yes | The file to be uploaded, including its name and access to its binary content. |
folder | string | No | Destination folder path from root (e.g., ‘/Documents/Reports’) or a unique folder ID. If the folder path doesn’t exist, it will be created automatically. |
site_id | string | No | The unique identifier of the SharePoint site to upload to. Mutually exclusive with drive_id. |
user_id | string | No | User ID or ‘me’ for the authenticated user. |
drive_id | string | No | The unique identifier of the drive to upload to. Mutually exclusive with site_id. |
description | string | No | A user-visible description of the file. Only supported on OneDrive Personal. |
defer_commit | boolean | No | If true, the final file creation is deferred until an explicit completion request is made. |
if_match_etag | string | No | An ETag value to prevent lost updates. |
file_system_info | object | No | File system information on client. |
conflict_behavior | string | No | How to handle file name conflicts. ‘rename’ (default), ‘fail’, or ‘replace’. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Preview Drive Item
Section titled “Preview Drive Item”ONE_DRIVE_PREVIEW_DRIVE_ITEM
Generates or retrieves a short-lived, permission-bound embeddable URL for a preview of a specific item. URLs expire and must be regenerated per session — do not cache. Use when you need to display a temporary preview of a file.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
page | string | No | Optional. Page number of document to start at, if applicable. |
zoom | number | No | Optional. Zoom level to start at, if applicable. |
item_id | string | Yes | The unique identifier of the DriveItem. |
site_id | string | No | The unique identifier of the Site. Provide if the item is in a SharePoint site. |
user_id | string | No | The unique identifier of the User. Provide if the item is in another user’s drive. |
drive_id | string | No | The unique identifier of the Drive. If not provided, the request will be made to the current user’s drive. |
group_id | string | No | The unique identifier of the Group. Provide if the item is in a group drive. |
share_id | string | No | The unique identifier of the shared item. Provide if the item is accessed via a share link. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Read Workbook Range
Section titled “Read Workbook Range”ONE_DRIVE_READ_WORKBOOK_RANGE
Reads a range of cells from an Excel workbook worksheet stored in OneDrive or SharePoint using Microsoft Graph API. Returns cell values, formulas, formatting, and metadata for the specified range. Use this action when you need to extract data from specific cells in an Excel file.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
address | string | Yes | The range address in A1 notation. Supports single cells (e.g., ‘A1’), cell ranges (e.g., ‘A1:B5’), entire columns (e.g., ‘A:A’), or entire rows (e.g., ‘1:1’). |
item_id | string | Yes | The unique identifier of the workbook item (Excel file). |
drive_id | string | Yes | The unique identifier of the drive containing the workbook. |
session_id | string | No | Optional workbook session ID. |
select_fields | array | No | Optional list of specific fields to return in the response. |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet within the workbook. Non-ASCII names are automatically URL-encoded. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Restore Deleted Item
Section titled “Restore Deleted Item”ONE_DRIVE_RESTORE_DRIVE_ITEM
Tool to restore a deleted OneDrive driveItem (file or folder) from the recycle bin. Use when you need to recover a deleted item to its original location or to a specified parent folder, optionally renaming it during restoration. IMPORTANT LIMITATION: This API is ONLY available for OneDrive Personal accounts. It does NOT work with OneDrive for Business or SharePoint.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The new name for the restored item. If not provided, the item will be restored with its original name. |
item_id | string | Yes | The unique identifier of the deleted DriveItem (file or folder) to restore. This item must currently be in the OneDrive recycle bin. |
drive_id | string | No | The unique identifier of the Drive containing the deleted item. Required when using application authentication. |
parent_reference_id | string | No | The unique identifier of the parent folder where the item should be restored. If not provided, the item will be restored to its original parent location. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Search Items
Section titled “Search Items”ONE_DRIVE_SEARCH_ITEMS
Search OneDrive for files and folders by keyword. Searches filenames, metadata, and file content to find matching items. Supports filtering, sorting, and pagination. Newly created or recently moved files may not appear due to indexing delays.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
q | string | Yes | The query text used to search for items. Values are matched across filenames, metadata, and file content. Simple keyword-based search only — KQL operators are NOT supported. Wildcard characters (* and ?) are NOT supported. |
top | integer | No | The maximum number of items to return in a single page. Default is 200. |
expand | string | No | A comma-separated list of relationship names to expand and include in the response. |
select | string | No | Comma-separated list of driveItem properties to include in the response. |
orderby | string | No | A comma-separated list of properties used to sort the order of the items in the response. |
drive_id | string | No | The ID of the drive to search within. If not provided, the user’s personal drive (me/drive) will be searched. |
skip_token | string | No | A token to retrieve the next page of results. |
search_scope | string | No | Specifies the scope of the search. ‘root’ searches within the folder hierarchy starting from root. ‘drive’ broadens the search to include items shared with the current user. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Delete Drive Following
Section titled “Delete Drive Following”ONE_DRIVE_UNFOLLOW_ITEM
Tool to unfollow a driveItem by removing it from the user’s followed items collection. Use when you need to stop following a file or folder that was previously marked to follow.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the driveItem to unfollow. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Update Drive Item Metadata
Section titled “Update Drive Item Metadata”ONE_DRIVE_UPDATE_DRIVE_ITEM_METADATA
Tool to update the metadata of a specific item (file or folder) in OneDrive. Use this to rename items, change descriptions, or move items to a new parent folder.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The new name for the drive item. Must not contain illegal characters. |
item_id | string | Yes | The unique identifier of the drive item (file or folder) to update. |
site_id | string | No | The unique identifier of the site. |
user_id | string | No | The unique identifier of the user. |
drive_id | string | No | The unique identifier of the drive. |
group_id | string | No | The unique identifier of the group. |
if_match | string | No | The eTag or cTag value for conditional update. |
description | string | No | The new description for the drive item. |
file_system_info | object | No | File system information on client. |
parent_reference_id | string | No | The ID of the new parent item. Use this to move the item. |
parent_reference_drive_id | string | No | The drive ID of the new parent item, if moving to a different drive. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Update Drive Item Permissions
Section titled “Update Drive Item Permissions”ONE_DRIVE_UPDATE_DRIVE_ITEMS_PERMISSIONS
Tool to update the roles of an existing permission on a OneDrive drive item. Use when you need to change the access level (read, write, owner) for a specific permission on a file or folder.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
roles | array | Yes | Array of Microsoft Graph role strings to assign to the permission. Common values include read, write, and owner. |
item_id | string | Yes | The unique identifier of the drive item. |
site_id | string | No | The unique identifier of a SharePoint site. |
user_id | string | No | The unique identifier of a user. |
drive_id | string | No | The unique identifier of the drive. |
group_id | string | No | The unique identifier of a group. |
permission_id | string | Yes | The unique identifier of the permission to update. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Update File Content
Section titled “Update File Content”ONE_DRIVE_UPDATE_FILE_CONTENT
Tool to update an existing file’s content in OneDrive. When called without a file parameter, creates an upload session and returns its uploadUrl (legacy behavior). When called with a file, the action streams the file’s bytes in chunks via the upload session and returns the final updated DriveItem.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
file | object | No | Optional file content to upload. When provided, the action creates an upload session and streams the file bytes. When omitted, only creates the upload session and returns its uploadUrl. |
item_id | string | Yes | The unique identifier of the DriveItem (file) to update. |
site_id | string | No | The unique identifier of the SharePoint site. Mutually exclusive with drive_id, group_id, and user_id. |
user_id | string | No | The unique identifier of the user. Mutually exclusive with drive_id, site_id, and group_id. |
drive_id | string | No | The unique identifier of the drive. If not provided, uses /me/drive. Mutually exclusive with site_id, group_id, and user_id. |
group_id | string | No | The unique identifier of the group. Mutually exclusive with drive_id, site_id, and user_id. |
defer_commit | boolean | No | If true, the final file creation is deferred until an explicit completion request is made. |
media_source | object | No | Media source information. Only on OneDrive for Business and SharePoint. |
if_match_etag | string | No | An ETag value to prevent lost updates. |
file_system_info | object | No | File system information on client. |
conflict_behavior | string | No | How to handle conflicts when updating the file. ‘replace’ overwrites (default), ‘fail’ returns an error, ‘rename’ creates a new file. |
drive_item_source | object | No | Information about the drive item source. Only on OneDrive for Business and SharePoint. |
if_none_match_etag | string | No | An ETag value to prevent updates if the item already exists. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Update Workbook Range
Section titled “Update Workbook Range”ONE_DRIVE_UPDATE_WORKBOOK_RANGE
Updates a range in a workbook worksheet using Microsoft Graph API. Use this action when you need to write data, formulas, or number formats to specific cells in an Excel workbook stored in OneDrive or SharePoint.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
values | array | No | Optional 2D array containing values to write to the range. At least one of values, formulas, or number_format must be provided. |
address | string | Yes | The range address in A1 notation. |
item_id | string | Yes | The ID of the workbook item |
drive_id | string | Yes | The ID of the drive containing the workbook |
formulas | array | No | Optional 2D array containing formulas to set. If both formulas and values are provided, formulas take precedence. |
session_id | string | No | Optional workbook session ID. |
number_format | array | No | Optional 2D array containing number format strings |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Update Workbook Worksheet
Section titled “Update Workbook Worksheet”ONE_DRIVE_UPDATE_WORKBOOK_WORKSHEET
Updates properties of a worksheet in an Excel workbook stored in OneDrive. Use this action when you need to rename a worksheet, change its position (tab order), or modify its visibility state. At least one of name, position, or visibility must be provided.
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
name | string | No | The new display name for the worksheet. |
item_id | string | Yes | The ID of the workbook item (Excel file) containing the worksheet. |
drive_id | string | Yes | The ID of the drive containing the workbook. |
position | integer | No | The new zero-based position of the worksheet in the workbook. |
session_id | string | No | Optional workbook session ID. |
visibility | string | No | Worksheet visibility state. Values: Visible, Hidden, VeryHidden. |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet to update. Will be URL-encoded automatically. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |
Write Workbook Cell
Section titled “Write Workbook Cell”ONE_DRIVE_WRITE_WORKBOOK_CELL
Updates the value, formula, or format of a specific cell in an Excel workbook stored in OneDrive. Use this action when you need to write data to a single cell at a specific row and column position. The row and column parameters are 0-indexed (row 0 is the first row, column 0 is column A).
Input parameters
Section titled “Input parameters”| Name | Type | Required | Description |
|---|---|---|---|
row | integer | Yes | The row number of the cell (0-indexed). Row 0 is the first row in the worksheet. |
column | integer | Yes | The column number of the cell (0-indexed). Column 0 is the first column (A) in the worksheet. |
values | array | No | Optional 2D array containing the value to write to the cell. Must be a single-cell array like [['new value']]. At least one of values, formulas, or number_format must be provided. |
item_id | string | Yes | The ID of the workbook item (Excel file) in OneDrive. |
drive_id | string | Yes | The ID of the drive containing the workbook. |
formulas | array | No | Optional 2D array containing a formula to set in the cell. If provided, this takes precedence over values. |
session_id | string | No | Optional workbook session ID. |
number_format | array | No | Optional 2D array containing the number format string for the cell. |
worksheet_id_or_name | string | Yes | The ID or name of the worksheet where the cell is located. |
Output
Section titled “Output”| Name | Type | Required | Description |
|---|---|---|---|
data | string | Yes | Data from the action execution |
error | string | No | Error if any occurred during the execution of the action |
successful | boolean | Yes | Whether or not the action execution was successful or not |