Office 365 Move File/Folder Giving Error

Hi Team,

I am using Office 365 Move File/Folder activity to move file to destination folder.
File To be moved - it is of datatype UiPath.Graph.DriveItem
Destination Folder - It is of datatype UiPath.Graph.Grive Item

Activity is successfully moving the file but throwing below exception
Move File/Folder: A value of type ‘UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem’ cannot be set to the location with name ‘MovedDriveItem’ because it is a location of type ‘Microsoft.Graph.DriveItem’.

Please help to resolve this issue.



If your objective is solely to move the file from source to destination, you can surround the activity in the Try-Catch & handle the exception thrown locally. Since it it already successfully moving the file but throwing an exception, you can handle the exception & proceed with any further actions.

If your objective is to identify the root cause of the issue & handle it accordingly, you can try the following steps:

→ Assuming you have a variable named sourceFile of type UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem representing the file you want to move.

  • Create a new variable, let’s name it sourceDriveItem, of type UiPath.Graph.DriveItem.
  • Assign the value of sourceFile to sourceDriveItem variable. This will perform the data type conversion.

Hope this helps,
Best Regards.

Thanks for your reply @arjunshenoy.

The activity will accept only variables of type UiPath.Graph.DriveItem.
Even in UiPath documentation they have mentioned same.


Hi Team,

I have been facing the same issue. Please suggest is there is any alternate solution.

Pavithra BR

I have a similar issue that modern and classic o365 activities are not compatible with each other… how to convert UiPath.MicrosoftOffice365.Files.Models.O365WorkbookRemoteItem into UiPath.Graph.DriveItem? Simple Assign doesn’t work here.


I had the same issue, but I updated UiPath.MicrosoftOffice365.Activities dependency to version 2.2.7 and it started working without any issue


I am on 2.2.7 - it shows me the error I posted earlier.