One Drive

Learn how to use One Drive with Composio

Overview

Enum

ONE_DRIVE

Description

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

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to Files.ReadWrite.All,Sites.Read.All,offline_access

Actions

Downloads a file from a user's onedrive using its item id, which must refer to a file and not a folder.

Action Parameters

file_name
stringRequired
item_id
stringRequired
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
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.

Action Parameters

name
stringRequired
parent_folder
stringDefaults to /
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
Creates a new text file with specified content in a onedrive folder, using either the folder's unique id or its absolute path (paths are automatically resolved to ids); note that onedrive may rename or create a new version if the filename already exists.

Action Parameters

content
stringRequired
folder
stringDefaults to /
name
stringRequired
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
Non-recursively finds an item (file or folder) in a specified onedrive folder; if `folder` is provided as a path, it must actually exist.

Action Parameters

folder
stringDefaults to /
include_metadata
boolean
name
stringRequired
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
Finds folders by name within an accessible parent folder in onedrive, or lists all its direct child folders if no name is specified.

Action Parameters

folder
stringDefaults to /
name
string
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
Retrieves all files and folders as `driveitem` resources from the root of a specified user's onedrive, automatically handling pagination.

Action Parameters

select
array
top
integerDefaults to 50
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean
Uploads a file to a specified onedrive folder, automatically renaming on conflict and supporting large files via chunking.

Action Parameters

file
objectRequired
folder
stringDefaults to /
user_id
stringDefaults to me

Action Response

data
object
error
successful
boolean