6 configuration options · available in Rust, Python, Node.js, Java
use opendal::Operator;
let op = Operator::via_iter("onedrive", [
])?;
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.
| Key | Type | Required | Description |
|---|---|---|---|
root | string | no | The root path for the OneDrive service for the file access |
access_token | string | no | Microsoft Graph API (also OneDrive API) access token |
refresh_token | string | no | Microsoft Graph API (also OneDrive API) refresh token |
client_id | string | no | Microsoft Graph API Application (client) ID that is in the Azure's app registration portal |
client_secret | string | no | Microsoft Graph API Application client secret that is in the Azure's app registration portal |
enable_versioningdeprecated | bool | no | Deprecated: 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. |