
Microsoft 365 List
CertifiedList OneDrive/SharePoint folder items
Microsoft 365 List
List OneDrive/SharePoint folder items
Lists children of a folder (defaults to drive root) and follows Graph pagination until all items are collected. Requires Microsoft Graph permissions Files.Read.All and Sites.Read.All.
type: io.kestra.plugin.microsoft365.oneshare.ListExamples
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
Drive ID
OneDrive or SharePoint drive identifier required for all OneShare tasks
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
Folder ID
DriveItem ID of the folder to list; defaults to 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.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
tenantId string
Tenant ID
Outputs
count integer
0Number of files
files array
List of files