
Microsoft 365 Download
CertifiedDownload SharePoint file to storage
Microsoft 365 Download
Download SharePoint file to storage
Downloads a file by ID or path from a document library and stores it in Kestra internal storage (kestra:///). Uses the Graph download URL and can fail if the link is unavailable for very large or locked files. Requires Microsoft Graph permissions Files.Read.All and Sites.Read.All.
type: io.kestra.plugin.microsoft365.sharepoint.DownloadExamples
Download a file from SharePoint
id: microsoft365_sharepoint_download
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.microsoft365.sharepoint.Download
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
itemId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
Download a file by path
id: microsoft365_sharepoint_download_by_path
namespace: company.team
tasks:
- id: download
type: io.kestra.plugin.microsoft365.sharepoint.Download
tenantId: "{{ secret('AZURE_TENANT_ID') }}"
clientId: "{{ secret('AZURE_CLIENT_ID') }}"
clientSecret: "{{ secret('AZURE_CLIENT_SECRET') }}"
siteId: "contoso.sharepoint.com,2C712604-1370-44E7-A1F5-426573FDA80A,2D2244C3-251A-49EA-93A8-39E1C3A060FE"
driveId: "b!BCTBCKSP50iysCOFPU"
itemPath: "/Documents/report.pdf"
Properties
clientId *Requiredstring
Azure client ID
Application (client) ID of the registered Entra ID app
clientSecret *Requiredstring
Azure client secret
Client secret for the app registration; required for client-credentials flow
siteId *Requiredstring
SharePoint site ID
Site identifier in Graph format hostname,siteId,webId
tenantId *Requiredstring
Azure tenant ID
Azure AD (Entra ID) tenant GUID used for Graph authentication
driveId string
Drive ID
Document library ID; if omitted the first drive returned for the site is used
itemId string
Item ID
ID of the file to download; either itemId or itemPath is required
itemPath string
Item path
Path relative to the drive root (e.g., '/Documents/file.txt'); either itemPath or itemId is required
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
itemId string
ID of the downloaded item
name string
Name of the downloaded file
size integer
Size of the downloaded file in bytes
uri string
URI of the file in Kestra internal storage
webUrl string
Web URL of the file in SharePoint