> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft OneDrive Integration for AI Agents & Workflows

> Access and manage files in Microsoft OneDrive: search, list, upload, download, create folders, and create sharing links via the Microsoft Graph API.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/microsoft-onedrive.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=e86ae39cdce7d52dd0b4b1a72e5a03cf" alt="Microsoft OneDrive logo" width="72" height="72" data-path="logos/microsoft-onedrive.svg" />

## Overview

Add **Microsoft OneDrive** to any ModuleX agent or workflow. Access and manage files in Microsoft OneDrive through the Microsoft Graph API (`https://graph.microsoft.com/v1.0`) — search, list, upload, download files, create folders, and produce sharing links using a user's delegated permissions.

<Info>
  **Categories**: Cloud Infrastructure · File Storage · Productivity · **Auth**: OAuth2 · **Actions**: 11
</Info>

## Authentication

### OAuth2 Authentication

Connect using Microsoft (Azure Entra) OAuth

<Steps>
  <Step title="Step 1">
    Go to [https://entra.microsoft.com](https://entra.microsoft.com) -> App registrations -> New registration
  </Step>

  <Step title="Step 2">
    Set supported account types according to your needs (commonly 'Accounts in any organizational directory and personal Microsoft accounts')
  </Step>

  <Step title="Step 3">
    Add redirect URI (Web): [https://api.modulex.dev/credentials/oauth2/callback](https://api.modulex.dev/credentials/oauth2/callback)
  </Step>

  <Step title="Step 4">
    Under API permissions, add Microsoft Graph delegated permissions: Files.ReadWrite.All, Sites.ReadWrite.All, User.Read, offline\_access
  </Step>

  <Step title="Step 5">
    Create a client secret under Certificates & secrets
  </Step>

  <Step title="Step 6">
    Copy Application (client) ID and the client secret value
  </Step>
</Steps>

#### Required Credentials

| Field         | Description                               | Required | Format                                 |
| ------------- | ----------------------------------------- | -------- | -------------------------------------- |
| Client ID     | Microsoft (Azure Entra) App Client ID     | Yes      | `00000000-0000-0000-0000-000000000000` |
| Client Secret | Microsoft (Azure Entra) App Client Secret | Yes      | `-`                                    |

#### OAuth Configuration

* **Authorization URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`
* **Token URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/token`
* **Scopes**: `Files.ReadWrite.All`, `Sites.ReadWrite.All`, `User.Read`, `offline_access`

## Available Actions

<AccordionGroup>
  <Accordion title="create_folder — Create a new folder in a drive. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_post_children">
    ### Parameters

    <ResponseField name="folder_name" type="string" required>
      The name of the new folder to be created (e.g. 'New Folder').
    </ResponseField>

    <ResponseField name="parent_folder_id" type="string">
      The ID of the folder which the new folder should be created within. Omit to create the folder at the drive root.
    </ResponseField>

    <ResponseField name="shared_folder_reference" type="string">
      Reference of the shared folder which the new folder should be created in (e.g. '/drives/\{driveId}/items/\{folderId}/children'). Mutually exclusive with parent\_folder\_id.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "CreateFolderResult": {
          "additionalProperties": false,
          "description": "Microsoft Graph response for creating a folder.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "parentReference": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Parentreference"
            }
          },
          "title": "CreateFolderResult",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/CreateFolderResult"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "CreateFolderOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="create_link — Create a sharing link for a DriveItem. See https://docs.microsoft.com/en-us/graph/api/driveitem-createlink">
    ### Parameters

    <ResponseField name="drive_item_id" type="string" required>
      The ID of the DriveItem to create a sharing link for.
    </ResponseField>

    <ResponseField name="type" type="string" required>
      The type of sharing link to create. One of: view, edit, embed.
    </ResponseField>

    <ResponseField name="scope" type="string">
      The scope of link to create. One of: anonymous, organization.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "CreateLinkResult": {
          "additionalProperties": false,
          "description": "Microsoft Graph response for creating a sharing link (Permission resource).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "link": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Link"
            }
          },
          "title": "CreateLinkResult",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/CreateLinkResult"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "CreateLinkOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="download_file — Download a file stored in OneDrive. Returns the file content as base64-encoded data plus the saved /tmp path. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get_content">
    ### Parameters

    <ResponseField name="file_id" type="string">
      The ID of the file to download. Provide either file\_id or file\_path.
    </ResponseField>

    <ResponseField name="file_path" type="string">
      The path to the file from the root folder (e.g. 'Documents/My Subfolder/File 1.docx'). Provide either file\_id or file\_path.
    </ResponseField>

    <ResponseField name="new_file_name" type="string" required>
      The file name to save the downloaded content as, under /tmp. Include the file extension.
    </ResponseField>

    <ResponseField name="convert_to_format" type="string">
      Optional format to convert the file to. One of: pdf, html.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DownloadFileResult": {
          "additionalProperties": false,
          "description": "Result envelope for download_file — file saved to /tmp + base64 content.",
          "properties": {
            "tmp_file_path": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Tmp File Path"
            },
            "file_name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File Name"
            },
            "size_bytes": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size Bytes"
            },
            "content_base64": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Content Base64"
            }
          },
          "title": "DownloadFileResult",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/DownloadFileResult"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "DownloadFileOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="find_file_by_name — Search for a file or folder by name. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_search">
    ### Parameters

    <ResponseField name="name" type="string" required>
      The name of the file or folder to search for.
    </ResponseField>

    <ResponseField name="exclude_folders" type="boolean">
      Set to true to return only files in the response. Defaults to false. (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DriveItemSummary": {
          "additionalProperties": false,
          "description": "A DriveItem (file or folder) as returned by Microsoft Graph.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastModifiedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastmodifieddatetime"
            },
            "file": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File"
            },
            "folder": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Folder"
            },
            "parentReference": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Parentreference"
            }
          },
          "title": "DriveItemSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/DriveItemSummary"
          },
          "title": "Items",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "FindFileByNameOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_excel_table — Retrieve a table from an Excel spreadsheet stored in OneDrive. The table must exist within the Excel spreadsheet. See https://learn.microsoft.com/en-us/graph/api/table-range">
    ### Parameters

    <ResponseField name="item_id" type="string" required>
      The ID of the Excel (.xlsx) file in OneDrive.
    </ResponseField>

    <ResponseField name="table_name" type="string" required>
      Name of the table as set in the Table Design tab of Excel.
    </ResponseField>

    <ResponseField name="remove_headers" type="boolean">
      By default, the headers are included as the first row. Set true to remove them. (Default: `false`)
    </ResponseField>

    <ResponseField name="number_of_rows" type="integer">
      Number of rows to return. Leave at 0 to return all rows. (Default: `0`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "GetExcelTableResult": {
          "additionalProperties": false,
          "description": "Result envelope for get_excel_table — table rows as list[list[str]].",
          "properties": {
            "rows": {
              "items": {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              "title": "Rows",
              "type": "array"
            },
            "row_count": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Row Count"
            }
          },
          "title": "GetExcelTableResult",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/GetExcelTableResult"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetExcelTableOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_file_by_id — Retrieve a file by ID. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_get">
    ### Parameters

    <ResponseField name="file_id" type="string" required>
      The ID of the DriveItem to retrieve.
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DriveItemSummary": {
          "additionalProperties": false,
          "description": "A DriveItem (file or folder) as returned by Microsoft Graph.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastModifiedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastmodifieddatetime"
            },
            "file": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File"
            },
            "folder": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Folder"
            },
            "parentReference": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Parentreference"
            }
          },
          "title": "DriveItemSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "item": {
          "anyOf": [
            {
              "$ref": "#/$defs/DriveItemSummary"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetFileByIdOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_files_in_folder — Retrieve a list of the files and/or folders directly within a folder. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_list_children">
    ### Parameters

    <ResponseField name="folder_id" type="string" required>
      The ID of the folder whose children should be listed.
    </ResponseField>

    <ResponseField name="exclude_folders" type="boolean">
      Set true to return only files (omit subfolders). (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DriveItemSummary": {
          "additionalProperties": false,
          "description": "A DriveItem (file or folder) as returned by Microsoft Graph.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastModifiedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastmodifieddatetime"
            },
            "file": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File"
            },
            "folder": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Folder"
            },
            "parentReference": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Parentreference"
            }
          },
          "title": "DriveItemSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/DriveItemSummary"
          },
          "title": "Items",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListFilesInFolderOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_my_drives — Get the signed-in user's drives. Returns a list of all the drives the user has access to, including the personal OneDrive. See https://learn.microsoft.com/en-us/graph/api/drive-list">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DriveSummary": {
          "additionalProperties": false,
          "description": "A Drive object as returned by Microsoft Graph.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "driveType": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Drivetype"
            },
            "owner": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Owner"
            },
            "quota": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Quota"
            }
          },
          "title": "DriveSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "drives": {
          "items": {
            "$ref": "#/$defs/DriveSummary"
          },
          "title": "Drives",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListMyDrivesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="list_shared_folder_reference_options — Retrieve available shared folder references. Useful as input to the shared_folder_reference parameter of create_folder.">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "SharedFolderReferenceOption": {
          "additionalProperties": false,
          "description": "A {label, value} option usable as create_folder.shared_folder_reference.",
          "properties": {
            "label": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Label"
            },
            "value": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Value"
            }
          },
          "title": "SharedFolderReferenceOption",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "options": {
          "items": {
            "$ref": "#/$defs/SharedFolderReferenceOption"
          },
          "title": "Options",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "ListSharedFolderReferenceOptionsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="search_files — Search for files and folders in Microsoft OneDrive. See https://learn.microsoft.com/en-us/graph/api/driveitem-search">
    ### Parameters

    <ResponseField name="q" type="string" required>
      The query text used to search for items. Values may be matched across several fields including filename, metadata, and file content.
    </ResponseField>

    <ResponseField name="exclude_folders" type="boolean">
      Set true to filter out folders from the results. (Default: `false`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "DriveItemSummary": {
          "additionalProperties": false,
          "description": "A DriveItem (file or folder) as returned by Microsoft Graph.",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            },
            "createdDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Createddatetime"
            },
            "lastModifiedDateTime": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Lastmodifieddatetime"
            },
            "file": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "File"
            },
            "folder": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Folder"
            },
            "parentReference": {
              "anyOf": [
                {
                  "additionalProperties": true,
                  "type": "object"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Parentreference"
            }
          },
          "title": "DriveItemSummary",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "items": {
          "items": {
            "$ref": "#/$defs/DriveItemSummary"
          },
          "title": "Items",
          "type": "array"
        }
      },
      "required": [
        "success"
      ],
      "title": "SearchFilesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="upload_file — Upload a file to OneDrive by providing a publicly-accessible source URL. The file is streamed from the URL into OneDrive under the given folder. See https://learn.microsoft.com/en-us/onedrive/developer/rest-api/api/driveitem_put_content">
    ### Parameters

    <ResponseField name="upload_folder_id" type="string" required>
      The ID of the folder where you want to upload the file.
    </ResponseField>

    <ResponseField name="file_url" type="string" required>
      Publicly accessible URL of the file to upload. The integration downloads the content and re-uploads it to OneDrive.
    </ResponseField>

    <ResponseField name="filename" type="string" required>
      Name of the new uploaded file (including extension).
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "UploadFileResult": {
          "additionalProperties": false,
          "description": "Microsoft Graph response for an uploaded DriveItem (subset of fields).",
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "webUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Weburl"
            },
            "size": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            }
          },
          "title": "UploadFileResult",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "result": {
          "anyOf": [
            {
              "$ref": "#/$defs/UploadFileResult"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "UploadFileOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* Microsoft Graph applies per-app and per-user throttling — bursty workloads
  may receive `429` responses with `Retry-After` hints. See
  [https://learn.microsoft.com/en-us/graph/throttling](https://learn.microsoft.com/en-us/graph/throttling) for current limits.
* `download_file` saves the file under the backend's `/tmp` directory **and**
  returns the content base64-encoded. For very large files, prefer routing
  through the workflow-engine layer.
* `upload_file` accepts only a publicly-accessible source URL. Uploading from
  a local `/tmp` path is not supported.
* Dynamic dropdowns for folder, file, drive, and table selection are not
  exposed — supply IDs and names directly. Use `list_my_drives`,
  `list_files_in_folder`, `search_files`, or `find_file_by_name` to discover
  IDs.
* Webhook-style notifications (new file / new folder created) are not exposed
  in this integration; route those needs to the workflow-engine layer.
* **Error model**: non-2xx responses, timeouts, and unexpected exceptions are
  caught and returned as `success=False` + `error` rather than raising. Agents
  should branch on the error string to decide whether to retry or surface to
  the user.

## Related integrations

<CardGroup cols={3}>
  <Card title="Dropbox" href="/integrations/tools/dropbox" />

  <Card title="Amazon Web Services" href="/integrations/tools/aws" />

  <Card title="Azure Storage" href="/integrations/tools/azure-storage" />
</CardGroup>

## Links

* [Microsoft OneDrive](https://onedrive.live.com)
