Logo

Microsoft OneDrive

Authentication: Microsoft OAuth. Requires a connected Microsoft 365 account with access to OneDrive.

Description: Browse and download files and folders stored in Microsoft OneDrive.


Beta Notice

This tool is currently in beta testing and not yet available for general use.

To get the Microsoft OneDrive tool added to your Cotera workspace, please contact our support team at support.cotera.co.


Files

Browse folder contents and retrieve files.

List Files

List files and folders in a OneDrive folder, or search across the drive. Supports pagination via pageToken and nextPageToken. Returns item metadata including names, sizes, timestamps, MIME type, and folder flags.

Operation Type: Query (Read)

Parameters:

  • folderId string (nullable, default null): The ID of the folder to list. If omitted, lists the root folder.
  • maxResults number (nullable, default 10): Maximum number of items to return per page.
  • search string (nullable, default null): A search query. When provided, searches across the entire drive instead of listing a specific folder.
  • pageToken string (nullable, default null): Pagination token from a previous response's nextPageToken to fetch the next page of results.

Returns:

  • files array: Array of file/folder items, each with:
    • id string: Item ID.
    • name string: Item name.
    • size number (nullable): File size in bytes.
    • webUrl string (nullable): URL to view the item in the browser.
    • createdDateTime string (nullable): Creation timestamp.
    • lastModifiedDateTime string (nullable): Last modification timestamp.
    • mimeType string (nullable): MIME type of the file.
    • isFolder boolean: Whether the item is a folder.
  • nextPageToken string (nullable): Token to pass as pageToken for the next page of results. null when there are no more pages.

Example:

{
  "folderId": null,
  "maxResults": 10,
  "search": null,
  "pageToken": null
}

Get File

Get metadata for a specific OneDrive file, including a temporary download URL and parent folder path.

Operation Type: Query (Read)

Parameters:

  • fileId string (required): The ID of the file to retrieve.

Returns:

  • id string: File ID.
  • name string: File name.
  • size number (nullable): File size in bytes.
  • webUrl string (nullable): URL to view the file in the browser.
  • createdDateTime string (nullable): Creation timestamp.
  • lastModifiedDateTime string (nullable): Last modification timestamp.
  • mimeType string (nullable): MIME type of the file.
  • isFolder boolean: Whether the item is a folder.
  • downloadUrl string (nullable): Temporary download URL for the file content.
  • parentPath string (nullable): Path of the parent folder.

Example:

{
  "fileId": "01ABCDEFGHIJKLMNOPQRSTUVWX"
}