Skip to main content

Move File Or Folder

Prerequisite Permissions: For Move File Or Folder step in OneDrive following permissions are required

Permission typePermission (from least to most privileged)
Delegated (work or school account)Files.ReadWrite, Files.ReadWrite.All
Delegated (personal Microsoft account)Files.ReadWrite, Files.ReadWrite.All

Description

One Drive: Move File or Folder step moves a file or folder in OneDrive.

Note:

  • Support is provided for the Personal Drive, however, the displayed error message is not correct.
  • When Rename value and non-existing Destination Folder Path is provided and Create Folder is No, then this step will execute successfully and rename the source item.

Reference: https://docs.microsoft.com/en-us/graph/api/driveitem-move?view=graph-rest-1.0&tabs=http

Configurations

No.Field NameDescription
Configuration:
1Step NameName of the step. This name has to be unique in a single workflow.
Connection:
2Client IDSelect the client ID for which you want to copy a file or folder.
Note: This field is mandatory for personal accounts.
3Checkbox: Accept value as variable/staticLeave checkbox unchecked to accept Refresh Token value from a field in the previous steps of the stream using a drop down list.
Else enable checkbox for Refresh Token field to appear as Text box.
4Refresh TokenSpecify the Refresh Token provided by authorization grant flow.
The data type is String. This field is mandatory.
5Button: Test ConnectionVerifies whether the connection is established or not.
Input Tab
Input Fields:
1Source File Or Folder ID/PathProvide OneDrive source file or folder path or id to move file or folder in destination.
The data type is String. This field is mandatory.
2Destination Folder ID/PathSpecify the OneDrive folder path or id to move file or folder.
The data type is String. This field is mandatory.

To specify OneDrive Path:
For example, OneDrive path == https://organization-my.sharepoint.com/personal/xyz/Documents/demofolder/File.xlsx
Provide == demofolder/File.xlsx
3Create Folder (if not exists)Specify the allowed values to perform the action.
Default value: Yes/No.
The data type is String.

To specify OneDrive Path to create folder:
For example, OneDrive path == https://organization-my.sharepoint.com/personal/xyz/Documents/abc
To create root folder == Documents/newfolder
To create inner folder == abc/newfolder
4File Or Folder Name After Move (Rename)Specify the name to rename the file or folder in destination location. The data type is String.
5If File Or Folder Exists On OneDrive PathSpecify from allowed values: AutoRename, Overwrite, ThrowException The data type is String.
Output Tab:
Output Fields:
1Output File Or Folder IDProvide output field name.
Default value: OutputFileOrFolderID
2Output File Or Folder PathProvide output field name.
Default value: OutputFileOrFolderPath

Known Issues
Sometimes, you may see a temporary error related to the internet connectivity and network issues. The issue arises when the hostname is unresolved and the local server does not receive a response from an authoritative server. For example, you may see any of the following messages:

  • login.microsoftonline.com. OR
  • This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server (login.microsoftonline.com)