List files in a OneDrive or SharePoint folder.
type: "io.kestra.plugin.microsoft365.oneshare.List"Examples
List files in OneDrive folder
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
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
driveId *Requiredstring
The ID of the drive.
clientId 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.
itemId string
The ID of the item (folder) to list children from. If not provided, the root of the drive is used.
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