List files in a OneDrive or SharePoint folder.

yaml
type: "io.kestra.plugin.microsoft365.oneshare.List"

List files in OneDrive folder

yaml
id: list_onedrive_files
namespace: company.team

tasks:
  - id: list_files
    type: io.kestra.plugin.microsoft365.oneshare.List
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "root"

List files in specific folder

yaml
id: list_folder_contents
namespace: company.team

tasks:
  - id: list_folder_files
    type: io.kestra.plugin.microsoft365.oneshare.List
    tenantId: "{{ secret('TENANT_ID') }}"
    clientId: "{{ secret('CLIENT_ID') }}"
    clientSecret: "{{ secret('CLIENT_SECRET') }}"
    driveId: "b!abc123def456"
    itemId: "01FOLDER123456789"
Properties

The ID of the drive.

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.

The ID of the item (folder) to list children from. If not provided, the root of the drive is used.

PEM Certificate

text
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.

Tenant ID

Default 0

The number of files.

SubType

The list of files.

Format date-time
Format date-time