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

Tool to copy a driveitem (file or folder) to a new location asynchronously. use when you need to duplicate an item, optionally renaming it or specifying a different parent folder. the operation is asynchronous; the response provides a url to monitor the copy progress.

Action Parameters

@microsoft.graph.conflictBehavior
stringDefaults to fail
children_only
boolean
drive_id
string
group_id
string
include_all_version_history
boolean
item_id
stringRequired
name
string
parent_reference
object
site_id
string
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to delete a driveitem (file or folder) by its unique id from the authenticated user's onedrive. use when you need to remove an item from onedrive. this action moves the item to the recycle bin, not permanently deleting it.

Action Parameters

if_match
string
item_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves the properties and relationships of a drive resource by its unique id. use this action when you need to get details about a specific onedrive, user's onedrive, group's document library, or a site's document library.

Action Parameters

drive_id
stringRequired
select_fields
array

Action Response

data
object
error
string
successful
boolean
Retrieves the metadata of a driveitem by its unique id. use this tool to get information about a specific file or folder in onedrive when you have its id. if a `drive id` is not provided, it defaults to the user's main drive.

Action Parameters

drive_id
string
expand_relations
array
item_id
stringRequired
select_fields
array

Action Response

data
object
error
string
successful
boolean
Retrieves the permissions of a driveitem by its unique id or path within a specific drive. use when you need to check who has access to a file or folder and what level of access they have.

Action Parameters

drive_id
string
group_id
string
item_id
stringRequired
item_path
string
select
string
site_id
string
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to retrieve the thumbnails associated with a driveitem. use when you need to display visual previews of files.

Action Parameters

drive_id
string
group_id
string
item_id
stringRequired
original_orientation
boolean
select
string
site_id
string
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to retrieve the version history of a driveitem by its unique id. use when you need to access or list previous versions of a file.

Action Parameters

drive_id
string
group_id
string
item_id
stringRequired
site_id
string
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to retrieve the quota information for the authenticated user's onedrive. use this action to check the storage space details like total, used, and remaining space on the user's onedrive.

Action Parameters

Action Response

data
object
error
string
successful
boolean
Retrieves a list of items that have been recently used by the authenticated user. this tool is useful when you need to access or display files and folders that the user has interacted with recently across their onedrive and accessible shared drives.

Action Parameters

Action Response

data
object
error
string
successful
boolean
Tool to retrieve a list of items that have been shared with the authenticated user. use this action to get details of files and folders shared with the current user.

Action Parameters

allow_external
boolean

Action Response

data
object
error
string
successful
boolean
Tool to get the items (list items) within a specific sharepoint list on a site. use when you need to retrieve data from a sharepoint list.

Action Parameters

expand
string
filter
string
list_id
stringRequired
select
string
site_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves metadata for a specific sharepoint site by its id. use this action when you need to get details like display name, web url, and creation/modification dates for a known sharepoint site.

Action Parameters

site_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Gets the content of a modern sharepoint site page. use when you need to retrieve the details and content of a specific page within a sharepoint site.

Action Parameters

expand
string
page_id
stringRequired
site_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to invite users or grant permissions to a specific item in a onedrive drive. use when you need to share a file or folder with other users and define their access level (e.g., read or write).

Action Parameters

drive_id
string
expiration_date_time
string
group_id
string
item_id
stringRequired
message
string
password
string
recipients
arrayRequired
require_sign_in
boolean
retain_inherited_permissions
booleanDefaults to True
roles
arrayRequired
send_invitation
boolean
site_id
string
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to retrieve a list of drive resources available to the authenticated user, or for a specific user, group, or site. use when you need to find out what drives are accessible.

Action Parameters

expand
string
group_id
string
orderby
string
select
string
site_id
string
skip_token
string
top
integer
user_id
string

Action Response

data
object
error
string
successful
boolean
Tool to list recent activities for a specific item in a onedrive drive. use when you need to track changes or actions performed on a file or folder.

Action Parameters

$filter
string
$orderby
string
$skip
integer
$top
integer
drive_id
stringRequired
item_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to list changes in the root of the user's primary drive using a delta token. use when you need to track file and folder modifications, additions, or deletions in the main onedrive directory.

Action Parameters

token
string

Action Response

data
object
error
string
successful
boolean
Tool to track changes to items in a sharepoint list using a delta query. use when you need to get newly created, updated, or deleted list items without performing a full read of the entire item collection.

Action Parameters

expand
string
list_id
stringRequired
select
string
site_id
stringRequired
token
string
top
integer

Action Response

data
object
error
string
successful
boolean
Tool to list all column definitions for a sharepoint site. use this when you need to retrieve the schema or structure of columns within a specific sharepoint site.

Action Parameters

expand
string
filter
string
orderby
string
select
string
site_id
stringRequired
skip
integer
top
integer

Action Response

data
object
error
string
successful
boolean
Tool to track changes to driveitems in the default document library of a sharepoint site. use when you need to get a list of items that have been added, modified, or deleted since a previous state or to get an initial enumeration of all items.

Action Parameters

site_id
stringRequired
token
string

Action Response

data
object
error
string
successful
boolean
Tool to list all lists under a specific sharepoint site. use when you need to enumerate lists within a known site.

Action Parameters

expand
string
filter
string
orderby
string
select
string
site_id
stringRequired
skip
integer
top
integer

Action Response

data
object
error
string
successful
boolean
Tool to list all subsites of a sharepoint site. use when you need to retrieve a collection of subsites for a given parent site.

Action Parameters

site_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Tool to list the current subscriptions for the authenticated user or app. use this to retrieve details of existing webhook subscriptions.

Action Parameters

Action Response

data
object
error
string
successful
boolean
Tool to move a file or folder to a new parent folder in onedrive. use when you need to reorganize your files or folders by changing their location. you can optionally rename the item during the move.

Action Parameters

driveId
string
itemId
stringRequired
name
string
parentReference
objectRequired

Action Response

data
object
error
string
successful
boolean
Generates or retrieves a short-lived embeddable url for a preview of a specific item. use when you need to display a temporary preview of a file.

Action Parameters

drive_id
string
group_id
string
item_id
stringRequired
page
string
share_id
string
site_id
string
user_id
string
zoom
number

Action Response

data
object
error
string
successful
boolean
Searches for driveitems in onedrive that match the specified query. use this to find files or folders based on keywords.

Action Parameters

drive_id
string
orderby
string
q
stringRequired
search_scope
stringDefaults to root
select
string
skip_token
string
top
integer

Action Response

data
object
error
string
successful
boolean
Tool to update the metadata of a specific item (file or folder) in onedrive. use this to rename items, change descriptions, or move items to a new parent folder.

Action Parameters

additional_properties
object
description
string
drive_id
string
group_id
string
item_id
stringRequired
name
string
parent_reference_drive_id
string
parent_reference_id
string
site_id
string
user_id
string

Action Response

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