Delete a file or folder from SharePoint.

yaml
type: "io.kestra.plugin.microsoft365.sharepoint.Delete"
yaml
id: microsoft365_sharepoint_delete
namespace: company.team

tasks:
  - id: delete
    type: io.kestra.plugin.microsoft365.sharepoint.Delete
    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"
    itemId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Q"
Properties

Azure Client ID

The client ID registered in Azure

Azure Client Secret

The client secret for the registered application

The item ID to delete.

The unique identifier of the file or folder to delete.

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.

The ID of the deleted item.

The unique identifier of the deleted file or folder.