Skip to main content

onedrive

6 configuration options · available in Rust, Python, Node.js, Java

Quick start
use opendal::Operator;

let op = Operator::via_iter("onedrive", [
])?;
All configuration options (copy & trim)
Full reference
use opendal::Operator;

let op = Operator::via_iter("onedrive", [
// The root path for the OneDrive service for the file access
// ("root".to_string(), "...".to_string()),

// Microsoft Graph API (also OneDrive API) access token
// ("access_token".to_string(), "...".to_string()),

// Microsoft Graph API (also OneDrive API) refresh token
// ("refresh_token".to_string(), "...".to_string()),

// Microsoft Graph API Application (client) ID that is in the Azure's app registration portal
// ("client_id".to_string(), "...".to_string()),

// Microsoft Graph API Application client secret that is in the Azure's app registration portal
// ("client_secret".to_string(), "...".to_string()),

])?;

Every option is passed as a string key; OpenDAL parses it into the right type. Some services may require building the binding with the matching services-* feature enabled.

Configuration reference

General6
KeyTypeRequiredDescription
rootstringnoThe root path for the OneDrive service for the file access
access_tokenstringnoMicrosoft Graph API (also OneDrive API) access token
refresh_tokenstringnoMicrosoft Graph API (also OneDrive API) refresh token
client_idstringnoMicrosoft Graph API Application (client) ID that is in the Azure's app registration portal
client_secretstringnoMicrosoft Graph API Application client secret that is in the Azure's app registration portal
enable_versioningdeprecatedboolnoDeprecated: OneDrive versioning capability is enabled by default.
Deprecated since 0.57.0: OneDrive versioning capability is enabled by default and this option is no longer needed.