
Microsoft 365 Delete
CertifiedDelete SharePoint file or folder
Microsoft 365 Delete
Delete SharePoint file or folder
Deletes a DriveItem by ID in a document library (Graph moves it to the Recycle Bin). Requires Microsoft Graph permissions Files.ReadWrite.All and Sites.ReadWrite.All.
type: io.kestra.plugin.microsoft365.sharepoint.DeleteExamples
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
clientId *Requiredstring
Azure client ID
Application (client) ID of the registered Entra ID app
clientSecret *Requiredstring
Azure client secret
Client secret for the app registration; required for client-credentials flow
itemId *Requiredstring
Item ID
Unique identifier of the file or folder to delete
siteId *Requiredstring
SharePoint site ID
Site identifier in Graph format hostname,siteId,webId
tenantId *Requiredstring
Azure tenant ID
Azure AD (Entra ID) tenant GUID used for Graph authentication
driveId string
Drive ID
Document library ID; if omitted the first drive returned for the site is used
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
itemId string
The ID of the deleted item
Unique identifier of the deleted file or folder