MICROSOFT ONEDRIVE¶
Connects to Microsoft OneDrive via the Microsoft Graph API using delegated (Access Token) authentication. Supports listing files and folders, uploading, downloading, retrieving metadata, sharing, and creating folders in a user’s OneDrive drive.
When to use¶
Tagged: access_token, cloud_storage, delegated_auth, download, file_sharing, graph_api, microsoft, oauth2.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Authentication Mode | auth_mode | select | client_credentials | ✓ | Authentication strategy to use: ‘client_credentials’ (app-only, currently unsupported for OneDrive /me/ endpoints and will return an error) or ‘access_token’ (delegated — required for all OneDrive operations); default is ‘client_credentials’ but must be set to ‘access_token’ in practice. |
| Azure Tenant ID | tenant_id | text | — | Azure AD (Entra ID) tenant GUID (e.g., ‘xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx’); required only for Client Credentials auth mode, which is not currently supported for OneDrive operations — leave blank when using Access Token mode. | |
| Application (Client) ID | client_id | text | — | Azure AD app registration client ID (GUID); required only for Client Credentials auth mode — leave blank when using Access Token mode. | |
| Client Secret | client_secret | text | — | Azure AD app registration client secret string; required only for Client Credentials auth mode — leave blank when using Access Token mode. | |
| Access Token | access_token | textarea | — | Pre-obtained OAuth 2.0 bearer token with delegated Microsoft Graph permissions (e.g., Files.ReadWrite); required when auth_mode is ‘access_token’ — obtain via your Azure AD OAuth 2.0 authorization code or device-code flow. | |
| Operation | operation | select | list_files | ✓ | OneDrive operation to execute: ‘list_files’ (enumerate items in a folder), ‘upload_file’ (write a file), ‘download_file’ (retrieve file bytes), ‘get_file_metadata’ (fetch item properties), ‘share_file’ (create a sharing link), or ‘create_folder’ (make a new directory); default is ‘list_files’. |
| File ID | file_id | text | — | OneDrive item ID (opaque string returned by the Graph API, e.g., from a prior ‘list_files’ call); required for ‘download_file’, ‘get_file_metadata’, and ‘share_file’ operations. | |
| Folder Path | folder_path | text | — | Drive-relative folder path (e.g., ‘Documents/Reports’) used as the target directory for ‘list_files’, ‘upload_file’, and ‘create_folder’ operations; leave blank to target the root drive. | |
| File Name | file_name | text | — | Name of the file or folder to create (e.g., ‘report.csv’ or ‘NewFolder’); required for ‘upload_file’ and ‘create_folder’ operations. | |
| File Content | file_content | textarea | — | Raw content (bytes or base64-encoded string) of the file to upload; required for the ‘upload_file’ operation. | |
| Share Type | share_type | select | view | Type of sharing link to create for the ‘share_file’ operation: ‘view’ (read-only, default) or ‘edit’ (read-write); ignored for all other operations. | |
| Max Results | max_results | number | 50 | Maximum number of items to return for ‘list_files’; integer between 1 and 999, default 50; clamped automatically if out of range. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| Status | status | text | Human-readable string indicating the outcome of the operation, e.g., ‘Success: list_files completed successfully.’ or an error message prefixed with ‘Error:’. |
| Results | results | dataset | Structured dataset (array of associative arrays) derived from the Graph API response — rows represent files/folders or metadata fields depending on the operation performed. |
| Raw Response | raw_response | json | Complete, unmodified JSON object returned by the Microsoft Graph API, useful for debugging or extracting fields not surfaced in the ‘results’ dataset. |
Disciplines¶
- data.io.file
- platform.integration
Auto-generated from platform schema. Worker id: microsoft_onedrive_worker. Schema hash: f56a58d3bbdf. Hand-curated docs in workerexamples/ override this page when present.