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

# OneDrive

> Connect OneDrive to your Atako agents — 9 read and 6 write actions.

Let your agents browse and search your OneDrive files and folders, create folders, rename and move items, create sharing links and send sharing invitations on your behalf.

## Connection

* **Authentication**: OAuth 2.0 — you authorize Atako via OneDrive's consent screen; no key to copy.
* **Scopes requested**:
  * `offline_access`
  * `User.Read`
  * `Files.Read`
  * `Files.ReadWrite`

<Note>
  Nothing to paste: click Connect and sign in with your Microsoft 365 work or school account. Prerequisite on the Atako side — same Microsoft Entra app as Outlook and Teams: an administrator sets INTEGRATION\_OAUTH\_ONEDRIVE\_CLIENT\_ID / \_CLIENT\_SECRET to the same values as INTEGRATION\_OAUTH\_OUTLOOK\_CLIENT\_ID / \_CLIENT\_SECRET, and adds the delegated permission Files.ReadWrite in Entra → App registrations → Atako → API permissions → Microsoft Graph → Delegated.

  See [OneDrive's documentation](https://learn.microsoft.com/en-us/graph/api/resources/onedrive).
</Note>

## Read actions (9)

| Action                | Description                                                                                                                                                                                                                   |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `get_drive`           | Fetch the connected user's default OneDrive drive metadata (id, driveType, owner, quota).                                                                                                                                     |
| `get_item`            | Fetch metadata for a single drive item (id, name, size, file/folder facet, webUrl, lastModifiedDateTime).                                                                                                                     |
| `get_item_by_path`    | Fetch metadata for a drive item by its path from the root of the user's OneDrive, e.g. "Documents/Reports/Q3 2026.xlsx" (folders separated by "/", no leading "/" needed). Returns id, name, size, file/folder facet, webUrl. |
| `list_children`       | List files and folders inside a folder. Use item\_id from list\_root\_children or list\_children. Optional: top (1–200), orderby.                                                                                             |
| `list_permissions`    | List the sharing permissions (roles, recipients, link details) on a drive item.                                                                                                                                               |
| `list_recent`         | List files recently accessed or modified by the connected user. Optional: top (1–200).                                                                                                                                        |
| `list_root_children`  | List files and folders in the root of the user's OneDrive. Optional: top (1–200, default 200), orderby ("name" or "lastModifiedDateTime desc").                                                                               |
| `list_shared_with_me` | List files and folders shared with the connected user by other users.                                                                                                                                                         |
| `search_items`        | Search the user's OneDrive for files and folders matching a query (file names, metadata and file content). Optional: top (1–200).                                                                                             |

## Write actions (6)

| Action              | Description                                                                                                                                                                                                                      |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `copy_item`         | Copy a drive item to a destination folder. Optional: name to rename the copy. Returns a 202 with a Location header for polling.                                                                                                  |
| `create_folder`     | Create a new folder inside a parent folder. conflictBehavior: "rename" (default, auto-rename), "replace" (overwrite), or "fail" (error if exists).                                                                               |
| `create_share_link` | Create a sharing link for a drive item. type: "view" (read-only), "edit" (read-write), or "embed" (OneDrive personal only). scope: "anonymous" (anyone), "organization" (tenant only), or "users" (specific people).             |
| `invite`            | Send a sharing invitation to one or more email addresses. roles: \["read"] or \["write"]. sendInvitation: true sends an email notification, false grants access silently. requireSignIn: true requires the recipient to sign in. |
| `move_item`         | Move a drive item to a different folder. Provide the destination folder's item\_id in destination\_folder\_id.                                                                                                                   |
| `rename_item`       | Rename a drive item (file or folder).                                                                                                                                                                                            |

## Permissions

Every action above must be explicitly granted to an agent before it can be used. See [Permissions](/integrations/permissions) for the grant model and [Security](/integrations/security) for how credentials are protected.
