
MicrosoftOneShare Upload
CertifiedUpload file to OneDrive or SharePoint
MicrosoftOneShare Upload
Upload file to OneDrive or SharePoint
Uploads a file from Kestra internal storage. Uses simple PUT up to the threshold (default 4MB) and resumable upload sessions above it, with conflictBehavior defaulting to REPLACE. Requires Microsoft Graph permissions Files.ReadWrite.All and Sites.ReadWrite.All.
type: io.kestra.plugin.microsoft365.oneshare.UploadExamples
Upload a FILE input to OneDrive
id: upload_to_onedrive
namespace: company.team
inputs:
- id: file
type: FILE
tasks:
- id: upload
type: io.kestra.plugin.microsoft365.oneshare.Upload
tenantId: "{{ secret('TENANT_ID') }}"
clientId: "{{ secret('CLIENT_ID') }}"
clientSecret: "{{ secret('CLIENT_SECRET') }}"
driveId: "b!abc123def456"
parentId: "root"
fileName: "uploaded-file.csv"
from: "{{ inputs.file }}"
Download data and upload to OneDrive
id: download_and_upload
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.core.http.Download
uri: https://example.com/data.csv
- id: upload
type: io.kestra.plugin.microsoft365.oneshare.Upload
tenantId: "{{ secret('TENANT_ID') }}"
clientId: "{{ secret('CLIENT_ID') }}"
clientSecret: "{{ secret('CLIENT_SECRET') }}"
driveId: "b!abc123def456"
parentId: "root"
fileName: "data.csv"
from: "{{ outputs.download.uri }}"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-microsoft365 --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
For Kestra CLI, replace LATEST with a specific version or version range to pin the plugin version.
Properties
driveId *string
Drive ID
OneDrive or SharePoint drive identifier required for all OneShare tasks
fileName *string
Destination filename
Filename to create in OneDrive/SharePoint; can differ from source name
from *string
Source file URI
URI in Kestra internal storage to upload (inputs/outputs/other tasks)
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
assets
Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset failure behavior
Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150clientId string
Client ID
Client ID of the Azure service principal. If you don't have a service principal, refer to create a service principal with Azure CLI.
clientSecret string
Client Secret
Service principal client secret. Use this for Client Secret authentication. Provide clientId, tenantId, and clientSecret. Either clientSecret OR pemCertificate must be provided, not both.
conflictBehavior string
REPLACEREPLACEFAILRENAMEConflict behavior
How to handle existing files: REPLACE (default), FAIL, or RENAME
largeFileThreshold integerstring
4194304Large file threshold
Bytes threshold to switch to resumable upload; default 4MB (4194304)
maxRetryAttempts integerstring
5Max retry attempts
Maximum retries for chunk uploads; default 5
maxSliceSize integerstring
3276800Max slice size
Chunk size in bytes for resumable upload; must be multiple of 320 KiB; default 3,276,800
parentId string
rootParent folder ID
Target folder ID; defaults to drive root
pemCertificate string
PEM Certificate
Alternative authentication method using certificate-based authentication.
Use this for Client Certificate authentication. Provide clientId, tenantId, and pemCertificate.
Either clientSecret OR pemCertificate must be provided, not both.
tenantId string
Tenant ID
Outputs
file
Uploaded file metadata