Back to tools

AI Agent Tool

OneDrive logo

OneDrive

Microsoft's cloud storage service for file sync, sharing, and collaboration across devices.

Cloud StorageCommunity

microsoft.com

•

One-click Login

About OneDrive

OneDrive is Microsoft's cloud storage service tightly integrated into Windows, Office, and Microsoft 365. It provides file sync across devices, real-time collaboration on Office documents, and secure external sharing. Personal plans offer up to 1 TB per user; business plans start at 1 TB and scale to unlimited storage. OneDrive is embedded in the Microsoft 365 ecosystem, making it the default file storage layer for Teams, SharePoint, and Outlook.

AI Agent Use Cases

- File sync across Windows, Mac, iOS, and Android devices

- Real-time co-authoring on Word, Excel, and PowerPoint files

- Granular sharing controls with expiring links and passwords

- Personal Vault with extra identity verification for sensitive files

- Version history and file restore up to 30 days (93 days on business plans)

- Microsoft 365 Copilot AI integration for file search and summarization

Available Actions

These are the specific actions that AI agents can perform with this tool

Inputs

access_token

The OAuth 2.0 bearer access token required for authorization. Must be included in the Authorization header.

parent_path

The folder path within the user's OneDrive where the new file will be created. Must begin with a slash and not end with a slash. Use an empty string for the root directory.

file_name

The name for the new file, including extension, to be created in the specified folder path.

file_content

The content of the file to be uploaded. Should be a bytes or binary object containing the literal content to store in the new file.

Inputs

driveId

The unique ID that identifies the drive (OneDrive, SharePoint library, etc). Required to target the correct drive for item deletion.

itemId

The unique identifier for the specific file or folder (DriveItem) to delete.

accessToken

OAuth 2.0 access token with sufficient Microsoft Graph permissions (e.g. Files.ReadWrite or Files.ReadWrite.All) to authenticate the request. Must be passed in the Authorization header as 'Bearer {accessToken}'.

ifMatch

Optional header. The eTag or cTag value to ensure the item is only deleted if it matches the current version.

prefer

Optional header. Used to bypass shared locks or checkout conditions when deleting an item.

Inputs

access_token

The OAuth 2.0 access token to authenticate the API request. This token must have appropriate permissions (e.g., Files.Read, Files.ReadWrite, etc.). Pass this in the Authorization header as 'Bearer {access_token}'.

ifNoneMatch

If specified, returns HTTP 304 Not Modified if the tag matches the current file's tag (etag or ctag). Set as the 'If-None-Match' HTTP header if used.

select

Comma-separated list of property names to select. Controls which properties are returned in the response. Sent as the $select query parameter in the URL.

expand

Specifies related resources to include in the response, such as 'children'. Sent as the $expand query parameter in the URL.

Inputs

access_token

The OAuth 2.0 Bearer access token authorized for the user, required to authenticate and authorize access to their Microsoft Graph resources. Pass as-is without extra encoding, in the Authorization header.

user_id

The unique identifier for the user whose OneDrive profile is being requested. Use 'me' to reference the current authenticated user, or provide a user ID string.

Inputs

drive-id

The unique ID of the drive to target. Omit when accessing the signed-in user's default drive using /me/drive.

item-id

The unique ID that specifies the folder (DriveItem) whose children (files and subfolders) will be listed.

$expand

Allows for the expansion of related resources inline, e.g., expand=thumbnails, to include additional related data. Optional.

$select

A comma-separated list of property names to include in the response. Optional, use to limit which properties are returned.

$top

Limits the number of items returned in a single response. Useful for paging. Optional.

$orderby

Specifies the order in which items are returned in the response. Optional.

$skipToken

Token used to access additional pages of results if paging is needed. Optional.

if-none-match

If provided and it matches the current item's eTag or cTag, returns a 304 Not Modified response. Optional.

access_token

OAuth 2.0 Bearer access token used for authentication. Must be passed in the 'Authorization' HTTP header.

Inputs

groupId

The unique identifier of the Microsoft 365 group whose document libraries (drives) you want to list. This is a required path parameter and must be specified exactly as assigned by Microsoft Graph. Typical format is a GUID.

access_token

OAuth 2.0 Bearer access token with delegated or application permissions as required by the Graph API. Must be included in the Authorization header as 'Bearer {access_token}'.

Inputs

access_token

OAuth 2.0 access token for authenticating the request. This must be included in the Authorization header as 'Bearer {access_token}'.

if-none-match

Returns HTTP 304 if the provided ETag or CTag matches the current tag of the root folder. Should be included in the request header if you want to use caching.

$top

Specifies the maximum number of items to return in the result set. Optional for controlling page size.

$skipToken

Token used to retrieve the next page of results if more results are available than the page size. Optional, only needed for paginated responses.

$select

Selects which fields to include in the response. Optional, controls the properties returned for each driveItem.

$expand

Expands related entities in line with the response. Optional, e.g., to expand children or thumbnails.

$orderby

Specifies the order of the returned items. Optional, uses driveItem properties for sorting.

Inputs

siteId

The unique identifier or URL-encoded resource path of the site whose drives (document libraries) you want to list. It must follow the format as required by Microsoft Graph (for example, a GUID or a SharePoint-compliant resource path).

access_token

OAuth 2.0 bearer access token with the necessary permissions (such as Files.Read.All or Sites.Read.All) to access site resources. This token is used for authentication and must be included in the Authorization header.

Inputs

userId

A unique identifier for the user whose drives will be listed; this is required and must be a valid Microsoft user ID or user principal name.

access_token

OAuth 2.0 access token with sufficient permissions (e.g., Files.Read, Files.ReadWrite, Files.Read.All, Files.ReadWrite.All, etc.); required for API authentication and should be included in the Authorization header.

Inputs

item-id

The unique identifier of the DriveItem (file or folder) to update in OneDrive. Required in the URL path.

updates

Dictionary with DriveItem properties you want to update. Only include changed properties; all others stay unchanged.

access_token

OAuth 2.0 Bearer token to authorize the request. Must be passed in the Authorization header as 'Bearer {access_token}'.

if-match

Optional. If specified, only perform the update if the supplied eTag/cTag matches the item's current version. Ensures concurrency control.