# OneDrive

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

- **Category:** file management & storage
- **Auth:** OAUTH2
- **Composio Managed App Available?** Yes
- **Tools:** 61
- **Triggers:** 9
- **Slug:** `ONE_DRIVE`
- **Version:** 20260323_00

## Frequently Asked Questions

### 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.

---

## Tools

### Check In Drive Item

**Slug:** `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

| Parameter | 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. |
| `checkInAs` | string | No | Optional. The status of the document after the check-in operation is complete. Can be 'published' or unspecified. |
| `driveItem_id` | string | Yes | The unique identifier of the driveItem to check in. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | Yes | The unique identifier of the drive containing the item to checkout. |
| `driveItem_id` | string | Yes | The unique identifier of the driveItem (file or folder) to checkout. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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. Recommended to provide either 'name' or 'parent_reference' for reliable operation. Must use stable OneDrive item IDs (not paths or names), as paths break on rename/relocation. Resolve names/paths first using ONE_DRIVE_SEARCH_ITEMS or ONE_DRIVE_ONEDRIVE_FIND_FOLDER. Expected keys: `driveId` and `id`. |
| `conflict_behavior` | string ("fail" | "replace" | "rename") | 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

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `roles` | array | Yes | Array of roles to assign to the permission. Valid values: read, write, owner. |
| `drive_id` | string | Yes | The unique identifier of the drive. |
| `grantedToV2` | object | Yes | The identity to grant permission to. Must contain either application or siteGroup property. |
| `driveItem_id` | string | Yes | The unique identifier of the drive item. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `type` | string ("view" | "edit" | "embed") | Yes | The type of sharing link to create. Valid values: `view`, `edit`, `embed`. |
| `scope` | string ("anonymous" | "organization" | "users") | 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 (e.g., `anonymous`), resulting in errors or more restrictive links than requested. |
| `item_id` | string | Yes | The unique identifier of the drive item (file or folder) for which to create the link. Note: Some item types cannot be shared, including embedded objects, certain system files, and items with restricted permissions. 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. |
| `expiration_date_time` | string | No | The expiration date and time for the permission, in yyyy-MM-ddTHH:mm:ssZ format. Example: 2023-12-31T23:59:59Z Must be a future UTC timestamp; past values will cause the call to fail. |
| `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

| Parameter | 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

**Slug:** `ONE_DRIVE_DELETE_ITEM`

Tool to delete a DriveItem (file or folder) by its unique ID from the authenticated user's OneDrive. Use when you need to remove an item from 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

| Parameter | 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 to avoid silently querying the wrong drive. |
| `if_match` | string | No | (Optional) 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

| Parameter | 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

**Slug:** `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

| Parameter | 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

| Parameter | 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

**Slug:** `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

| Parameter | 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

| Parameter | 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

**Slug:** `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

| Parameter | 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. Example format: u!aHR0cHM6Ly9jb21wb3NpbzIwMjQtbXkuc2hhcmVwb2ludC5jb20vOng6L2cvcGVyc29uYWwva2FyYW52YWlkeWFfYXV0aGtpdF9haS9JUURPT2NCVEx5RTFSWktVQkJGZ0YzZVZBUmI4Zk5XVjdhMUJidGQ1NDF2SEdXUQ |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | Yes | The unique identifier of the drive containing the item to discard checkout. |
| `driveItem_id` | string | Yes | The unique identifier of the driveItem (file or folder) to discard checkout. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("pdf" | "html") | No | Optional format for file conversion during download. 'pdf' converts supported source files (doc, docx, dot, dotx, dotm, dsn, dwg, eml, epub, fluidframework, form, htm, html, loop, loot, markdown, md, msg, note, odp, ods, odt, page, pps, ppsx, ppt, pptx, pulse, rtf, task, tif, tiff, wbtx, whiteboard, xls, xlsm, xlsx) to PDF. 'html' converts Loop/Fluid files (loop, fluid, wbtx) 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 (e.g., don't convert PDF to PDF or HTML to HTML), as this will result in an error. |
| `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. If the provided tag matches the current file's tag, the API returns HTTP 304 Not Modified without downloading the file, saving bandwidth. Useful for caching scenarios. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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

| Parameter | 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

**Slug:** `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. Supports accessing items by item_id or by path, and can target specific drives via drive_id.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `format` | string ("pdf" | "html") | Yes | Format to convert the item to. Use 'pdf' for Office documents (doc, docx, ppt, pptx, xls, xlsx, etc.) or 'html' for Loop/Fluid files (loop, fluid, wbtx). |
| `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 User Principal Name (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. If not provided, uses the default drive. |
| `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' or 'presentation.pptx'). Do not include leading slash. Either item_id or path_and_filename must be provided. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | Yes | The unique identifier of the drive containing the item to follow. This can be the ID of a personal OneDrive, a group's document library, or a SharePoint site's drive. |
| `driveItem_id` | string | Yes | The unique identifier of the driveItem (file or folder) to follow. DriveItem IDs are case-sensitive and must be used exactly as returned from Microsoft Graph API operations like list, search, or folder children queries. |

#### Output

| Parameter | 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

**Slug:** `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; missing drives indicate insufficient OAuth scope or tenant permissions.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | Yes | The unique identifier of the drive. This can be the ID of the user's personal OneDrive, a group's document library, or a specific drive ID. Must be a valid, non-empty value; 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. For example, "root,list" to include the root folder and list information. This allows you to retrieve related resources in a single request. |
| `select_fields` | array | No | A comma-separated list of properties to include in the response. Use this to retrieve specific fields and reduce the response size. For example, "id,name,driveType". If not provided, all default properties are returned. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `sharing_url` | string | No | A OneDrive or SharePoint sharing URL (e.g., 1drv.ms link, SharePoint link, or Teams contentUrl). This will be automatically encoded to a sharing token. Mutually exclusive with share_id_or_encoded_url. |
| `prefer_redeem` | string ("redeemSharingLinkIfNecessary" | "redeemSharingLink") | No | Controls access redemption. 'redeemSharingLink' grants durable access to the item. 'redeemSharingLinkIfNecessary' grants access only for this request. If not specified, no Prefer header is sent. |
| `select_fields` | array | No | A list of DriveItem properties to return. If not specified, a default set of properties is returned. Common fields: id, name, size, webUrl, file, folder, createdDateTime, lastModifiedDateTime, parentReference. |
| `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

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | Yes | The unique identifier of the drive. This can be the ID of the user's personal OneDrive, a group's document library, or a specific drive ID. |
| `driveItem_id` | string | Yes | The unique identifier of the followed driveItem to retrieve. This is the ID of a specific file or folder that has been followed. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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. Use this to retrieve specific fields and reduce the response size. For example, ["id", "name", "driveType"]. If not provided, all default properties are returned. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item_id` | string | Yes | The unique identifier of the DriveItem (file or folder). DriveItem IDs vary by platform: OneDrive for Business/SharePoint uses '01...' prefix format (e.g., '01NKDM7HMOJTVYMDOSXFDK2QJDXCDI3WUK'), while OneDrive Personal uses 'HASH!NUMBER' format (e.g., 'D4648F06C91D9D3D!54927'). 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, ONE_DRIVE_GET_RECENT_ITEMS, or similar operations. Do NOT use: web URLs, sharing links, SharePoint listItem IDs, or manually constructed identifiers. IDs become stale after move, rename, or delete; refresh via ONE_DRIVE_SEARCH_ITEMS or ONE_DRIVE_LIST_FOLDER_CHILDREN instead of retrying a stale ID. |
| `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 to avoid silently querying the wrong drive. |
| `select_fields` | array | No | A list of DriveItem properties to return. If not specified, a default set of properties is returned. Refer to the DriveItem resource documentation for available fields. |
| `expand_relations` | array | No | Navigation properties to expand in the response. Valid values: 'children' (folder contents), 'thumbnails' (image previews), 'versions' (version history), 'permissions' (sharing permissions), 'listItem' (SharePoint list item data), 'activities' (recent activities), 'analytics' (usage analytics), 'createdByUser' (creator user details), 'lastModifiedByUser' (last modifier user details), 'retentionLabel' (retention policy), 'subscriptions' (webhooks), 'workbook' (Excel workbook data). Note: 'content' is NOT expandable - use ONE_DRIVE_DOWNLOAD_FILE to retrieve file content; 'listItem' requires SharePoint drives; some properties have regional/license restrictions. When expanding 'children': the array may be empty or absent; check for its presence and branch on 'file' vs 'folder' facets before processing. Expansion is non-recursive — call this tool separately for each child folder to traverse nested trees. |

#### Output

| Parameter | 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

**Slug:** `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. Response nests permission entries under `data.value`; check top-level `success`/`error` flags before processing results. Results include inherited permissions, owner entries, and anonymous link entries — not just explicitly granted permissions. Sharing links may have differing scopes (org-only vs. anonymous); verify `link.scope` before treating a permission as externally accessible.

#### Input Parameters

| Parameter | 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 | Yes | The unique identifier of the drive item. Verify the correct item before calling — disambiguate similarly named files using folder path, timestamps, or file size. |
| `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. Required if not using other identifiers like group_id, site_id, or user_id in the path. |
| `group_id` | string | No | The unique identifier of a group. Use this if the item is in a group's drive. |
| `item_path` | string | No | The path to the item relative to the drive's root. Use this if item_id is not known. Must start with ':/' and end with ':/'. Example: ':/FolderA/FileB.txt:/'. Only applicable when accessing items in the current user's drive (me/drive/root). Does NOT substitute `item_id` (which is required); use only as supplemental path context for items in the current user's drive. |
| `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

| Parameter | 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

**Slug:** `ONE_DRIVE_GET_ITEM_THUMBNAILS`

Tool to retrieve the thumbnails associated with a DriveItem. Use when you need to display visual previews of files. Response contains a `value` array with size keys (`small`, `medium`, `large`); thumbnails may not be generated for all file types or newly uploaded items, so handle an empty or missing `value` array. Returned thumbnail URLs are external HTTP endpoints with independent availability.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `select` | string | No | A comma-separated list of thumbnail sizes to retrieve (e.g., "small,medium,large", or "c300x400_crop"). If not specified, all available thumbnails for the first thumbnailSet (id: "0") are returned. |
| `item_id` | string | Yes | The unique identifier of the DriveItem. |
| `site_id` | string | No | The unique identifier of a Site. Provide either drive_id, group_id, site_id, or user_id. |
| `user_id` | string | No | The unique identifier of a User. Provide either drive_id, group_id, site_id, or user_id. |
| `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. Provide either drive_id, group_id, site_id, or user_id. |
| `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

| Parameter | 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

**Slug:** `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. Version history may be unavailable or empty for folders or items in drives without versioning enabled.

#### Input Parameters

| Parameter | 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. One of these must be provided if not using the /me path. |
| `group_id` | string | No | The unique identifier of the group. Mutually exclusive with drive_id, site_id, and user_id. |

#### Output

| Parameter | 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

**Slug:** `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 — NOT by modification time; use ONE_DRIVE_ONEDRIVE_LIST_ITEMS or ONE_DRIVE_LIST_ROOT_DRIVE_CHANGES for strictly modification-based queries. Use when you need to see what the user worked on recently (e.g., 'Show me files I worked on today'). Different from search - this tracks activity, not content. Results may contain duplicate names; disambiguate using lastModifiedDateTime, parentReference.path, and the file/folder property before acting on a specific item.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | Maximum number of recent items to return (1-200). Controls response size for better performance. Use pagination with @odata.nextLink for larger datasets. |
| `select` | string | No | Comma-separated list of properties to include in the response. Significantly reduces payload size by returning only specified fields. Common properties: id, name, webUrl, size, lastModifiedDateTime, lastAccessedDateTime, file, folder, parentReference. If not specified, all properties are returned (large payload). Always include id in select and use returned id values directly — never reconstruct or hardcode IDs, as stale or manually constructed IDs will fail in tools like ONE_DRIVE_GET_ITEM. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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. Use this to retrieve specific fields and reduce the response size. Common fields include: id, name, size, createdDateTime, lastModifiedDateTime, webUrl, folder, root. If not provided, all default properties are returned. |

#### Output

| Parameter | 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

**Slug:** `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. Use when you have a shareId or sharing token and need information about what was shared.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `prefer_redeem` | string ("redeemSharingLinkIfNecessary" | "redeemSharingLink") | No | Controls access redemption. 'redeemSharingLink' grants durable access to the item (permanent permission). 'redeemSharingLinkIfNecessary' grants access only for this request (temporary, no lasting permission). If not specified, no Prefer header is sent and no redemption occurs. |
| `expand_children` | boolean | No | If true and the shared item is a folder, expands the children collection to include child items in the response. Only applicable for folders. |
| `share_id_or_encoded_sharing_url` | string | Yes | A sharing token (shareId) as returned by the API or a properly encoded sharing URL. To encode a URL: base64 encode it, convert to unpadded base64url format (remove '=' padding, replace '/' with '_', '+' with '-'), and prepend 'u!'. Example: 'u!aHR0cHM6Ly9jb21wb3NpbzIwMjQtbXkuc2hhcmVwb2ludC5jb20vOng6L2cvcGVyc29uYWwva2FyYW52YWlkeWFfYXV0aGtpdF9haS9JUURPT2NCVEx5RTFSWktVQkJGZ0YzZVZBVEliM2JmcUhzNFNqaVp5S1E1UTVSOA' |

#### Output

| Parameter | 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

**Slug:** `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; response value array may be empty if no items exist. Use webUrl field from results for clickable links to items.

#### Input Parameters

| Parameter | 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

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | The maximum number of items to return in a single response. Used for pagination. |
| `skip` | integer | No | The number of items to skip in the result set. Used for pagination. |
| `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, or 'fields($select=columnName1,columnName2)' to retrieve specific fields. For example, to get specific columns 'Name' and 'Color', use 'fields($select=Name,Color)'. SharePoint internal field names may differ from display names; call without expand first (or use 'fields' alone) to discover actual internal names before filtering or selecting specific fields. |
| `filter` | string | No | An OData filter query to restrict the results. For example, to filter items where 'Quantity' is less than 600, use 'fields/Quantity lt 600'. |
| `select` | string | No | A comma-separated list of properties to include in the response. Often used in conjunction with '$expand=fields(select=...)'. For example, 'id,name,fields'. |
| `list_id` | string | Yes | The unique identifier of the list within the SharePoint site. |
| `orderby` | string | No | OData order by expression to sort results. For example, 'fields/Name asc' or 'fields/Quantity desc'. |
| `site_id` | string | Yes | The unique identifier of the SharePoint site. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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. This is the id property of the site resource. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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

| Parameter | 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

**Slug:** `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

| Parameter | 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. Use this to retrieve specific fields and reduce the response size. For example, ['id', 'name', 'size']. If not provided, all default properties are returned. |
| `expand_relations` | array | No | Navigation properties to expand in the response. Common values: 'children' (folder contents), 'thumbnails' (image previews). Other options: 'permissions', 'versions', 'activities', 'analytics', 'createdByUser', 'lastModifiedByUser', 'retentionLabel', 'subscriptions', 'workbook'. |
| `special_folder_name` | string ("documents" | "photos" | "cameraroll" | "approot" | "music" | "recordings") | Yes | The name of the special folder to retrieve. Valid values: 'documents' (Documents folder), 'photos' (Photos folder), 'cameraroll' (Camera Roll Backup folder), 'approot' (application's personal folder), 'music' (Music folder), 'recordings' (Recordings folder - only available in OneDrive for Business/SharePoint). Special folders provide simple aliases to access well-known folders without needing the folder path or ID. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `roles` | array | Yes | Array of role strings specifying the access level to grant: 'read' for view-only access or 'write' for edit access. |
| `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!). Encode the sharing URL using base64url format and prefix with 'u!' to create the encoded sharing URL. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `roles` | array | Yes | Specifies the roles to be granted to the recipients. Options: 'read' (view-only), 'write' (edit), 'owner' (full control). |
| `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. 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 another user's drive that you have access to. |
| `drive_id` | string | No | The unique identifier of the drive. If not provided, the authenticated user's personal drive (me/drive) will be used. |
| `group_id` | string | No | The unique identifier of a Microsoft 365 group. Use this if the item is in a group's drive. |
| `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 of the invitation is required to sign-in to view the shared item. At least one of require_sign_in or send_invitation must be true. |
| `send_invitation` | boolean | No | If true, a sharing link is sent to the recipient. Otherwise, a permission is granted directly without sending a notification. |
| `expiration_date_time` | string | No | Specifies the dateTime after which the permission expires. ISO 8601 format. Example: "2023-12-31T23:59:59.000Z" |
| `retain_inherited_permissions` | boolean | No | Optional. If true (default), any existing inherited permissions are retained on the shared item when sharing this item for the first time. If false, all existing permissions are removed when sharing for the first time. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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 (/me/drive) will be used. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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 (e.g., 'children'). Note: expand=children is not supported for listing bundles. |
| `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 (e.g., 'id,name,bundle'). |
| `orderby` | string | No | A comma-separated list of properties to order the results by, optionally followed by 'asc' or 'desc' (e.g., 'name desc'). |
| `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

| Parameter | 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

**Slug:** `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. Returns only drives within the signed-in account's permission scope; missing drives indicate insufficient permissions or different tenant scope. Results are paginated — follow skip_token across all pages to avoid missing drives. Returned drives represent document libraries and may not reflect full SharePoint site structure; use SHARE_POINT_GET_SITE_COLLECTION_INFO or SHARE_POINT_SEARCH_QUERY for broader coverage. Use driveType and webUrl to distinguish personal, system, and SharePoint-backed drives.

#### Input Parameters

| Parameter | 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 (e.g., "root,list"). |
| `select` | string | No | Comma-separated list of properties to include in the response (e.g., "id,name,driveType"). |
| `orderby` | string | No | A comma-separated list of properties to order the results by, optionally followed by "asc" or "desc" (e.g., "name desc"). |
| `site_id` | string | No | The ID of the site to list drives for. If provided, group_id and user_id should not be used. |
| `user_id` | string | No | The ID of the user to list drives for. If provided, group_id and site_id should not be used. If none of group_id, site_id, or user_id are provided, the drives for the current authenticated user (/me/drives) will be listed. |
| `group_id` | string | No | The ID of the group to list drives for. If provided, site_id and user_id should not be used. |
| `skip_token` | string | No | A token used to retrieve the next page of results. Results may be paginated; retrieve and pass this token repeatedly until no token is returned to ensure all drives are fetched. |

#### Output

| Parameter | 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

**Slug:** `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. Use when you need to enumerate folder contents deterministically, find companion artifacts (e.g., .vtt/.docx files), or browse within a known folder.

#### Input Parameters

| Parameter | 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 (e.g., ['thumbnails', 'permissions']). Use this to include related resources inline. |
| `select` | array | No | Comma-separated list of properties to include in the response (e.g., ['id', 'name', 'size']). |
| `orderby` | string | No | Sort results by specified properties (e.g., 'name', 'lastModifiedDateTime desc'). |
| `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. Alternative to 'next_link'. |
| `folder_path` | string | No | Path relative to the drive root (e.g., '/', '/Recordings', '/Documents/Project'). Use '/' to list the root folder's children. Alternative to 'folder_item_id'. |
| `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. Supports both simple item IDs (e.g., '01BYE5RZ6QN3ZWBTUFOFD3GSPGOHDJD36K') and drive-qualified item IDs with '!' separator (e.g., 'driveId!itemId' format commonly returned from search results or shared item listings). When a drive-qualified ID is detected, the drive portion is automatically extracted and used in the API request. Note: The 'driveId!itemId' pattern is based on observed OneDrive API behavior and may not be explicitly documented. Required unless 'folder_path' is provided. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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 (e.g., ['driveItem', 'listItem']). Use this to include related resources inline. |
| `filter` | string | No | OData filter expression to filter activities (e.g., "activityDateTime gt 2023-01-01T00:00:00Z"). Allows filtering by date ranges or other criteria. |
| `select` | array | No | Comma-separated list of properties to include in the response (e.g., ['id', 'activityDateTime', 'actor']). Reduces payload size by returning only specified properties. |
| `item_id` | string | Yes | The unique identifier of the driveItem. |
| `orderby` | string | No | Sort results by specified properties (e.g., 'activityDateTime desc' to show newest first, 'activityDateTime' for oldest first). |
| `drive_id` | string | Yes | The unique identifier of the drive. |

#### Output

| Parameter | 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

**Slug:** `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. Losing the deltaLink token forces a full resync. Responses include deleted items (check `deleted` property) and the root item itself alongside files and folders.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | Maximum number of items to return in a single response. Useful for pagination and controlling response size. |
| `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. Loop until `@odata.nextLink` is absent to get complete results; default page size is ~200 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. Use this to retrieve specific fields and reduce response size. |
| `drive_id` | string | No | The ID of the drive to track changes for. If not provided, will attempt to use the authenticated user's default drive (requires delegated auth). For application auth, this parameter is required. |

#### Output

| Parameter | 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

**Slug:** `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, password protection, and access details.

#### Input Parameters

| Parameter | 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. This is typically an encoded sharing URL prefixed with 'u!' or a shareId token from a previous API call. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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. Use 'fields($select=ColumnA,ColumnB)' format for field selection. |
| `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

| Parameter | 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

**Slug:** `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

| Parameter | 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. Used for pagination. |
| `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. Example: `contoso.sharepoint.com,2C712604-133D-4A7C-9194-F53CE4C952A2,A704AEF5-C2C0-43C3-A3D8-9F55A73A02E2` |

#### Output

| Parameter | 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

**Slug:** `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 or to get an initial enumeration of all items.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | Maximum number of items to return in a single response. Useful for pagination and controlling response size. |
| `token` | string | No | A token used to retrieve a specific page of results or to get changes since a previous state. Can be 'latest' to get the most recent delta token without items, 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. Use this to retrieve specific fields and reduce response size. |
| `site_id` | string | Yes | The unique identifier of the SharePoint site. |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_LIST_SITE_LISTS`

Tool to list all lists under a specific SharePoint site. Use when you need to enumerate lists within a known site. Returns only Microsoft Graph-supported lists — internal/system lists are excluded, so results may be a strict subset of all site lists (e.g., 13 returned where 108 exist). Results are in the `data.value` array. IMPORTANT: Only works with organizational Microsoft 365 accounts (Azure AD/Entra ID). NOT supported for personal Microsoft accounts (MSA/Outlook.com/Hotmail). Personal OneDrive users cannot access SharePoint sites through this endpoint.

#### Input Parameters

| Parameter | 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' (e.g., 'contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D4B0860-D7DE-419B-88E6-5866AF240000'). Must contain exactly two commas separating three parts: (1) SharePoint hostname, (2) site collection GUID, (3) web GUID. Only works with organizational Microsoft 365 accounts. |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_LIST_SITE_SUBSITES`

Tool to list all subsites of a SharePoint site. Use when you need to retrieve a collection of subsites for a given parent site. IMPORTANT: This action only works with organizational Microsoft 365 accounts (Azure AD/Entra ID accounts). It is NOT supported for personal Microsoft accounts (MSA/Outlook.com/Hotmail accounts). Personal OneDrive users cannot access SharePoint sites through this endpoint. An empty `value` array in the response means the site has no subsites, not a failure.

#### Input Parameters

| Parameter | 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. Example: id,name,webUrl |
| `orderby` | string | No | OData order by expression. Example: name asc, createdDateTime desc |
| `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`; partial or malformed IDs may silently return empty results rather than an error. |

#### Output

| Parameter | 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

**Slug:** `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. Results may span multiple drives and resources; filter client-side by resource URL or type to narrow to a specific scope. An empty `value` array means no subscriptions exist, not a failed call.

#### Output

| Parameter | 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

**Slug:** `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`; use the `name` parameter to provide a unique name or resolve the conflict beforehand.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the DriveItem. If not provided, the item retains its original name. Must not contain illegal filename characters; invalid characters cause an `invalidRequest` error. |
| `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. Mutually exclusive with drive_id, group_id, and user_id. |
| `userId` | string | No | The unique identifier of the user if accessing another user's drive. Mutually exclusive with drive_id, group_id, and site_id. |
| `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. Mutually exclusive with drive_id, site_id, and user_id. |
| `description` | string | No | The new description for the drive item. If not provided, the item's description is not changed. |
| `parentReference` | object | Yes | An object specifying the destination folder. Must be provided as an object/dictionary with an 'id' field containing the folder's unique identifier. Format: {"id": "<folder-id>", "driveId": "<drive-id>"} (driveId is optional). Example: {"id": "01BYE5RZZ272Y2AM3L22L22Z2Y2Y2Y2Y2Y"}. Note: Folder names are not accepted - use the folder's unique ID obtained from listing or searching items. |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_ONEDRIVE_CREATE_FOLDER`

Creates a new folder in the user's OneDrive, automatically renaming on conflict, optionally within a specified parent_folder (by ID or full path from root) which, if not the root, must exist and be accessible.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The desired name for the new folder (also accepts 'folder_name' as an alias). If a folder with this name already exists in the specified parent_folder, the new folder will be automatically renamed (e.g., 'New Folder' might become 'New Folder 1'). Examples: ['Annual Reports', 'Client Meeting Notes'] |
| `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. Provides a user-visible description of the folder. Examples: ['Project documents for Q1 2024', 'Meeting notes archive'] |
| `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'). If an ID is provided, it refers to an existing folder's unique ID. Examples: ['/Projects/Alpha', 'folder_id_12345ABC', '/'] |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_ONEDRIVE_CREATE_TEXT_FILE`

Creates a new plain-text file with specified content in the authenticated user's personal OneDrive, using either the folder's unique ID or its absolute path relative to the user's OneDrive root (paths are automatically resolved to IDs); note that OneDrive may rename or create a new version if the filename already exists. 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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The desired name for the new text file, including its extension (e.g., 'report.txt', 'notes.log'). Also accepts 'file_name' as an alias. |
| `folder` | string | No | The folder within the user's personal OneDrive where the new text file will be created. Use '/' for root, a path like '/Documents/Projects' (relative to OneDrive root), a folder name like 'MyFolder' (treated as '/MyFolder'), or a valid folder ID. Note: Paths are resolved against the user's personal OneDrive (/me/drive/root) only and cannot target SharePoint document libraries or shared drives. |
| `content` | string | Yes | The plain text content to be written into the new file. For very large text bodies, the request may fail or truncate; split large content across multiple files if needed. |
| `user_id` | string | No | The user's ID or the literal 'me' to represent the currently authenticated user. |
| `conflict_behavior` | string ("fail" | "replace" | "rename") | No | How to handle conflicts when a file with the same name already exists. 'fail' (default) returns an error if the file exists, 'replace' overwrites the existing file, 'rename' creates a new file with an incremented name (e.g., 'file 1.txt'). |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_ONEDRIVE_FIND_FILE`

Non-recursively finds an item (file or folder) in a specified OneDrive folder; if `folder` is provided as a path, it must actually exist. Results in large folders may be paginated via `@odata.nextLink`; iterate all pages to avoid missing files. For searches where the subfolder is unknown, use ONE_DRIVE_SEARCH_ITEMS instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | Yes | The exact name of the file or folder to find within the specified `folder`. Multiple items may match common names; use `include_metadata=true` and disambiguate by path, size, or last-modified timestamp. |
| `folder` | string | No | The unique identifier (ID) or absolute path of the OneDrive folder for the search. For the root folder, use '/'. Paths must start with '/'. A non-existent folder silently returns no results rather than an error. |
| `user_id` | string | No | The unique identifier of the user (e.g., a GUID) or the alias 'me' to represent the currently authenticated user. This determines whose OneDrive will be accessed. |
| `include_metadata` | boolean | No | If set to true, the response will include the complete metadata for each found item. If false (default), only essential properties like id, name, and webUrl are returned. |

#### Output

| Parameter | 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

**Slug:** `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, not deeper hierarchy levels.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | Maximum number of items to return in a single request. When specified, auto-pagination is disabled and only one page is returned. Use with skip_token to manually paginate through results. |
| `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 (e.g., 'thumbnails', 'children'). See Microsoft Graph API documentation for supported expand properties. |
| `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 (e.g., ['id', 'name', 'size']). Supports standard driveItem properties like id, name, webUrl, size, createdDateTime, lastModifiedDateTime, folder, etc. Note: 'folder' field is automatically included to enable folder identification, and 'name' is auto-included when filtering by folder name. |
| `orderby` | string | No | Sort results by specified properties (e.g., 'name', 'lastModifiedDateTime desc'). |
| `user_id` | string | No | User's unique identifier (e.g., email, UPN) or 'me' for the authenticated user, specifying the OneDrive account. |
| `skip_token` | string | No | A $skipToken value from a previous response for pagination continuation. When specified, auto-pagination is disabled and only the requested page is returned. |

#### Output

| Parameter | 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

**Slug:** `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. Results may include `remoteItem` pointers (shared items from other drives) — use `remoteItem.driveId` and `remoteItem.id` for those in downstream calls. Distinguish files from folders by presence of `file` or `folder` property. Always use `id` values returned by this tool directly; never construct item IDs manually. Items may be absent from results due to permission restrictions, not drive absence.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `top` | integer | No | Maximum items per API request, setting the batch size; the action automatically handles pagination to fetch all items. The Microsoft Graph API may limit this (e.g., to 999). |
| `select` | array | No | Specifies `driveItem` properties to return. If omitted or empty, default properties are returned. Refer to Microsoft Graph API documentation for a complete list of `driveItem` properties. |
| `user_id` | string | No | User's unique identifier (e.g., 'user@example.com', object ID) or 'me' for the authenticated user's OneDrive. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | 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 (including any intermediate folders in the path). |
| `site_id` | string | No | The unique identifier of the SharePoint site to upload to. If provided, uses /sites/{siteId}/drive. Mutually exclusive with drive_id. |
| `user_id` | string | No | User ID (e.g., user_principal_name, unique GUID) or 'me' for the authenticated user, determining the target OneDrive. |
| `drive_id` | string | No | The unique identifier of the drive to upload to. If not provided, uses the default drive of the user_id. 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. Useful for large files where you want to control when the upload is finalized. |
| `if_match_etag` | string | No | An ETag value to prevent lost updates. If provided, the upload will only proceed if the folder/parent's ETag matches this value. Returns 412 error if it doesn't match. |
| `file_system_info` | object | No | File system information on client. |
| `conflict_behavior` | string ("rename" | "fail" | "replace") | No | How to handle file name conflicts. 'rename' automatically renames the file if it exists (default), 'fail' returns an error, 'replace' overwrites the existing file. When renamed, the actual filename in the response may differ (e.g., suffixed with a number); use the response `id` or `webUrl` for follow-up operations. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | string | No | Optional. Page number of document to start at, if applicable. Specified as string for future use cases around file types such as ZIP. |
| `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

| Parameter | 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

**Slug:** `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. For Business/SharePoint accounts, use the SharePoint REST API endpoints (/_api/web/recyclebin) instead.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | (Optional) The new name for the restored item. If not provided, the item will be restored with its original name. This is useful if you want to rename the item during the restore process or if an item with the same name already exists in the destination. |
| `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. The ID can be obtained from deleted items listing or from the item before deletion. |
| `drive_id` | string | No | The unique identifier of the Drive containing the deleted item. Required when using application authentication. If not provided with delegated authentication, uses the authenticated user's default drive. |
| `parent_reference_id` | string | No | (Optional) 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. This is useful when you want to restore the item to a different folder than where it was originally located. |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_SEARCH_ITEMS`

Search OneDrive for files and folders by keyword. Searches filenames, metadata, and file content to find matching items. Use when you need to find specific files based on keywords, file types, or content. Supports filtering, sorting, and pagination. Results are mixed files and folders — filter client-side using file vs folder properties. Disambiguate similarly named items using parentReference.path, lastModifiedDateTime, and size before passing item IDs downstream. Newly created or recently moved files may not appear due to indexing delays; fall back to ONE_DRIVE_LIST_FOLDER_CHILDREN if expected items are missing. No server-side date filtering — apply lastModifiedDateTime/createdDateTime filtering in your own logic. HTTP 429 responses include a Retry-After header; use exponential backoff.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `q` | string | Yes | The query text used to search for items. Values are matched across filenames, metadata, and file content. This is a simple keyword-based search only - NOT KQL (Keyword Query Language). IMPORTANT: (1) KQL operators like 'folder:', 'file:', 'content:', 'filetype:' are NOT supported by this endpoint and will be treated as literal text search. Use plain keywords instead (e.g., 'shared documents' not 'folder:shared'). (2) Path-based filtering syntax (e.g., 'path:/folder') is NOT supported and will be transformed to a keyword search. (3) Wildcard characters (* and ?) are NOT supported and will be automatically removed - use file extension keywords instead (e.g., 'mp4' instead of '*.mp4'). To search within a specific folder, use ONE_DRIVE_LIST_FOLDER_CHILDREN. |
| `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. For driveItem resources, you can expand relationships like 'children' to get child items, 'thumbnails' to get thumbnail metadata, or 'permissions' to get sharing permissions. For example, use 'children' to include the child items of folders in search results, or 'thumbnails' to include thumbnail URLs. Note: Not all relationships may be expandable in search results. Refer to the Microsoft Graph API documentation for supported expansions. |
| `select` | string | No | Comma-separated list of driveItem properties to include in the response. Valid properties include: id, name, webUrl, size, createdDateTime, lastModifiedDateTime, file, folder, parentReference, createdBy, lastModifiedBy, fileSystemInfo, searchResult, remoteItem, etc. Note: @-prefixed annotations (e.g., @microsoft.graph.downloadUrl) are automatically stripped as they are not valid in $select queries for search endpoints. |
| `orderby` | string | No | A comma-separated list of properties used to sort the order of the items in the response. Use 'asc' or 'desc' for ascending or descending order, e.g., 'name asc'. |
| `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. Use ONE_DRIVE_LIST_DRIVES to get valid drive IDs. Note: Some drive ID formats (e.g., secondary personal drives or special SharePoint IDs) may return 'ObjectHandle is Invalid' errors due to Microsoft Graph API limitations. |
| `skip_token` | string | No | A token to retrieve the next page of results, obtained from the @odata.nextLink in a previous response. |
| `search_scope` | string ("drive" | "root") | No | Specifies the scope of the search. 'root' searches within the folder hierarchy starting from root (uses /drives/{drive_id}/root/search or /me/drive/root/search). 'drive' broadens the search to include items shared with the current user (uses /drives/{drive_id}/search or /me/drive/search). This parameter is respected both with and without a drive_id. |
| `stripped_annotations` | array | No | Internal field to track stripped annotations. Not exposed to API. |
| `transformed_path_query` | string | No | Internal field to track if path-based query was transformed. Not exposed to API. |
| `transformed_kql_operator` | string | No | Internal field to track if a KQL operator was transformed. Not exposed to API. |
| `transformed_parent_query` | string | No | Internal field to track if parent: filter was stripped from query. Not exposed to API. |
| `transformed_wildcard_query` | string | No | Internal field to track if wildcard characters were removed from query. Not exposed to API. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | Yes | The unique identifier of the driveItem to unfollow. This is the ID of an item in the user's followed items collection. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The new name for the drive item. Must not contain illegal characters: `\`, `/`, `:`, `*`, `?`, `'`, `<`, `>`, `\|`; these trigger an `invalidRequest` error. |
| `ifMatch` | string | No | The eTag or cTag value for conditional update. If this header is included and the eTag provided doesn't match the current eTag on the item, a 412 Precondition Failed response is returned. Use this to prevent conflicts when multiple users update the same item. |
| `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. Used when updating an item within a site's drive. |
| `user_id` | string | No | The unique identifier of the user. Used when updating an item within a specific user's drive. |
| `drive_id` | string | No | The unique identifier of the drive. Required if not using other specific paths like /me, /groups/{group-id}, /sites/{site-id}, or /users/{user-id}. |
| `group_id` | string | No | The unique identifier of the group. Used when updating an item within a group's drive. |
| `description` | string | No | The new description for the drive item. |
| `fileSystemInfo` | 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. The driveId of the parentReference can also be specified if moving between drives. For cross-drive moves, `parent_reference_drive_id` is required alongside this field. Omit both fields when only renaming or updating metadata to avoid unintended moves. |
| `parent_reference_drive_id` | string | No | The drive ID of the new parent item, if moving to a different drive. |

#### Output

| Parameter | 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

**Slug:** `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

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `roles` | array | Yes | Array of roles to assign to the permission. Valid values: read, write, owner. |
| `item_id` | string | Yes | The unique identifier of the drive item. |
| `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. Required if not using other identifiers like group_id, site_id, or user_id. |
| `group_id` | string | No | The unique identifier of a group. Use this if the item is in a group's drive. |
| `permission_id` | string | Yes | The unique identifier of the permission to update. |

#### Output

| Parameter | 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

**Slug:** `ONE_DRIVE_UPDATE_FILE_CONTENT`

Tool to create an upload session for updating an existing file's content in OneDrive. Use when you need to overwrite/update an existing DriveItem's content while preserving its item ID, avoiding duplicate copies and maintaining existing share links.

#### Input Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `name` | string | No | The name of the item (filename and extension). Use this to override the filename during the upload session. |
| `item_id` | string | Yes | The unique identifier of the DriveItem (file) to update. |
| `site_id` | string | No | The unique identifier of the SharePoint site. If provided, uses /sites/{siteId}/drive. Mutually exclusive with drive_id, group_id, and user_id. |
| `user_id` | string | No | The unique identifier of the user. If provided, uses /users/{userId}/drive. 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. If provided, uses /groups/{groupId}/drive. Mutually exclusive with drive_id, site_id, and user_id. |
| `file_size` | integer | No | Provides an expected file size to perform a quota check before uploading. Only supported on OneDrive Personal. |
| `description` | string | No | Provides a user-visible description of the item. Only supported on OneDrive Personal. |
| `defer_commit` | boolean | No | If true, the file creation is deferred until an explicit completion request is made. Useful for very large files where you want to control when the upload is finalized. |
| `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. If provided, the update will only proceed if the current file's ETag matches this value. Returns 412 error if it doesn't match. |
| `file_system_info` | object | No | File system information on client. |
| `conflict_behavior` | string ("replace" | "fail" | "rename") | No | How to handle conflicts when updating the file. 'replace' overwrites the existing content (default), 'fail' returns an error if conflict occurs, 'rename' creates a new file with a different name. |
| `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. If provided and the ETag matches, returns 412 error. Used to detect if the item has changed. |

#### Output

| Parameter | 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 |


## Triggers

### Onedrivebasetrigger

**Slug:** `ONE_DRIVE_BASE_TRIGGER`

**Type:** poll

Base trigger for OneDrive changes using Gmail-style state management.
    Subclasses override `filter_changes(...)` to extract only the relevant items.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for changes. Default is root. |
| `include_deleted` | boolean | No | Whether to include deleted items in the changes |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Type of change event (created, modified, deleted) |
| `item` | object | Yes | The OneDrive item that changed |

### OneDrive File Created Trigger

**Slug:** `ONE_DRIVE_FILE_CREATED_TRIGGER`

**Type:** poll

Triggers when a new file is created in OneDrive.
    Uses Gmail-style state management for reliable duplicate prevention.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for changes. Default is root. |
| `include_deleted` | boolean | No | Whether to include deleted items in the changes |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Type of change event (created, modified, deleted) |
| `item` | object | Yes | The OneDrive item that changed |

### File Updated

**Slug:** `ONE_DRIVE_FILE_UPDATED`

**Type:** poll

Trigger that fires when a OneDrive file's content or metadata changes.
    Returns file ID, last modified time, and modifier info.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for file updates. Use '/' for root or a subpath like 'Documents/Reports'. |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `file_id` | string | Yes | The ID of the updated file |
| `last_modified_time` | string | No | The ISO8601 timestamp when the file was last modified |
| `modified_by` | object | No | Information about who last modified the file |

### OneDrive Folder Created Trigger

**Slug:** `ONE_DRIVE_FOLDER_CREATED_TRIGGER`

**Type:** poll

Triggers when a new folder is created in OneDrive.
    Uses Gmail-style state management for reliable duplicate prevention.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for changes. Default is root. |
| `include_deleted` | boolean | No | Whether to include deleted items in the changes |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Type of change event (created, modified, deleted) |
| `item` | object | Yes | The OneDrive item that changed |

### OneDrive Item Deleted Trigger

**Slug:** `ONE_DRIVE_ITEM_DELETED_TRIGGER`

**Type:** poll

Triggers when a file or folder is deleted in OneDrive.
    Uses Gmail-style state management for reliable duplicate prevention.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for changes. Default is root. |
| `include_deleted` | boolean | No | Whether to include deleted items in the changes |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Type of change event (created, modified, deleted) |
| `item` | object | Yes | The OneDrive item that changed |

### Item Moved or Renamed

**Slug:** `ONE_DRIVE_ITEM_MOVED_OR_RENAMED_TRIGGER`

**Type:** poll

Triggers when a file or folder is moved to a different path or renamed in OneDrive.
    Includes both old and new path/name data in the payload.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for moves/renames. Default is root. |
| `include_files` | boolean | No | Whether to include files in move/rename detection. |
| `include_folders` | boolean | No | Whether to include folders in move/rename detection. |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Event type: renamed, moved, or moved_and_renamed |
| `item_id` | string | Yes | The unique identifier of the item |
| `item_type` | string | Yes | Type of the item: file or folder |
| `new_name` | string | No | Current name of the item |
| `new_path` | string | No | Current parentReference.path of the item |
| `old_name` | string | No | Previous name of the item |
| `old_path` | string | No | Previous parentReference.path of the item |
| `payload` | object | No | Full OneDrive payload |
| `web_url` | string | No | Web URL of the item |

### OneDrive Item Updated Trigger

**Slug:** `ONE_DRIVE_ITEM_UPDATED_TRIGGER`

**Type:** poll

Triggers when an existing file or folder is modified in OneDrive.
    Uses Gmail-style state management and only detects actual modifications, not new creations.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_path` | string | No | The path in OneDrive to monitor for changes. Default is root. |
| `include_deleted` | boolean | No | Whether to include deleted items in the changes |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `event_type` | string | Yes | Type of change event (created, modified, deleted) |
| `item` | object | Yes | The OneDrive item that changed |

### New Version Created

**Slug:** `ONE_DRIVE_NEW_VERSION_CREATED_TRIGGER`

**Type:** poll

Trigger that fires when a new version of a specified OneDrive file is created.

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | No | The unique identifier of the drive. Optional; defaults to /me if not provided. |
| `group_id` | string | No | The unique identifier of the group. Mutually exclusive with other scope IDs. |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `item_id` | string | Yes | The unique identifier of the OneDrive file to monitor. |
| `site_id` | string | No | The unique identifier of the site. Mutually exclusive with other scope IDs. |
| `user_id` | string | No | The unique identifier of the user. Mutually exclusive with other scope IDs. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `item_id` | string | Yes | The ID of the OneDrive file. |
| `modified_time` | string | Yes | The ISO 8601 timestamp of when this version was last modified. |
| `version_number` | string | Yes | The version number/ID as returned by Microsoft Graph (e.g., '2.0'). |

### Sharing Permission Added or Removed

**Slug:** `ONE_DRIVE_SHARING_PERMISSION_CHANGED_TRIGGER`

**Type:** poll

Sharing Permission Added or Removed

#### Configuration

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `drive_id` | string | No | Drive ID if monitoring an item outside the signed-in user's default drive. |
| `group_id` | string | No | Group ID if the item resides in a group's drive. |
| `include_role_updates` | boolean | No | If true, the trigger will also fire when roles are changed on an existing permission (e.g., from read to write). |
| `interval` | number | No | Periodic Interval to Check for Updates & Send a Trigger in Minutes |
| `item_id` | string | No | The unique identifier of the OneDrive item to monitor for permission changes. |
| `item_path` | string | No | Alternative to item_id. Path relative to drive root in the form ':/path/to/item:/' |
| `site_id` | string | No | SharePoint Site ID if the item resides in a site's drive. |
| `user_id` | string | No | User ID if the item resides in a specific user's drive. |

#### Payload

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `affected_identities` | array | No | Users/groups/apps affected by this change |
| `event_type` | string | Yes | permission_added \| permission_removed \| permission_updated |
| `item_id` | string | Yes | The OneDrive item ID whose sharing changed |
| `link` | object | No | Sharing link details, if any |
| `permission_id` | string | Yes | The permission ID involved in the change |
| `previous_roles` | array | No | The roles before the change (for updated) |
| `roles` | array | No | The roles after the change (for added/updated) |
