List items in a SharePoint document library or folder.

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

List items in a SharePoint document library

yaml
id: microsoft365_sharepoint_list
namespace: company.team

tasks:
  - id: list
    type: io.kestra.plugin.microsoft365.sharepoint.List
    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"
    folderId: "root"

List items in a specific folder

yaml
id: microsoft365_sharepoint_list_folder
namespace: company.team

tasks:
  - id: list
    type: io.kestra.plugin.microsoft365.sharepoint.List
    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"
    folderId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
Properties

Azure Client ID

The client ID registered in Azure

Azure Client Secret

The client secret for the registered application

Sharepoint Site ID

The id of the

Azure Tenant ID

The Azure Active Directory tenant ID

Drive ID

The id of the document library within the SharePoint site. If not provided, the default document library will be used.

Default FETCH
Possible Values
STOREFETCHFETCH_ONENONE

The way you want to store the data

FETCH - outputs the messages as an output FETCH_ONE - outputs the first message only as an output STORE - stores all messages to a file NONE - no output

Default root

Folder ID

The ID of the folder to list items from. Use 'root' for the root of the document library.

Single item

Single item. Only populated when fetchType is FETCH_ONE and an item exists.

SubType

The list of items

List of files and folders. Only populated when fetchType is FETCH or FETCH_ONE.

Total number of items

Total count of items fetched from the folder.

Format uri

URI of the stored items file

URI pointing to the file containing all items. Only populated when fetchType is STORE.

Unit count

Number of items returned

Format date-time

The creation time of the item.

The unique identifier of the item.

Whether the item is a file.

Whether the item is a folder.

Format date-time

The last modified time of the item.

The name of the item.

The size of the item in bytes.

The web URL of the item.