Microsoft 365 Export

Microsoft 365 Export

Certified

Export OneDrive/SharePoint file

Converts a single file to PDF or HTML via Graph content?format= and stores the converted copy in Kestra internal storage. Supported source types depend on Graph (Office docs for PDF; Loop/Fluid/WBTX for HTML). Requires Microsoft Graph permissions Files.Read.All and Sites.Read.All.

yaml
type: io.kestra.plugin.microsoft365.oneshare.Export

Export file to PDF format

yaml
id: export_to_pdf
namespace: company.team

tasks:
  - id: export
    type: io.kestra.plugin.microsoft365.oneshare.Export
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "01ABC123DEF456GHI789"
    format: PDF

Export file to HTML format

yaml
id: export_to_html
namespace: company.team

tasks:
  - id: export_html
    type: io.kestra.plugin.microsoft365.oneshare.Export
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "01EXCEL123456789"
    format: HTML
Properties

Drive ID

OneDrive or SharePoint drive identifier required for all OneShare tasks

Possible Values
PDFHTML

Export format

Target format PDF or HTML; Graph limits HTML to loop/fluid/wbtx types

Item ID

DriveItem ID of the file to export

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.

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.

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.

Reference (ref) of the pluginDefaults to apply to this task.

Tenant ID

Formaturi

URI of the exported file in Kestra internal storage