Microsoft 365 Move

Microsoft 365 Move

Certified

Move SharePoint file or folder

Moves a DriveItem to another parent folder within the same drive and can rename it in the same call. Requires Microsoft Graph permissions Files.ReadWrite.All and Sites.ReadWrite.All.

yaml
type: io.kestra.plugin.microsoft365.sharepoint.Move

Move an item to another folder in SharePoint

yaml
id: microsoft365_sharepoint_move
namespace: company.team

tasks:
  - id: move
    type: io.kestra.plugin.microsoft365.sharepoint.Move
    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"
    destinationParentId: "01BYE5RZ6QN3ZWBTURF3F43DSUNZYRZD5Z"
    newName: "renamed-document.txt"
Properties

Azure client ID

Application (client) ID of the registered Entra ID app

Azure client secret

Client secret for the app registration; required for client-credentials flow

Destination parent folder ID

ID of the destination folder (parent) to move the item into

Item ID

Unique identifier of the file or folder to move

SharePoint site ID

Site identifier in Graph format hostname,siteId,webId

Azure tenant ID

Azure AD (Entra ID) tenant GUID used for Graph authentication

Drive ID

Document library ID; if omitted the first drive returned for the site is used

New name

Optional new name for the moved item

Reference (ref) of the pluginDefaults to apply to this task.

ID of the moved item

Unique identifier of the moved file or folder

Name of the moved item

Current name of the moved item (after optional rename)

Destination parent ID

Parent folder ID where the item was moved

Web URL of the moved item