Moving file from onedrive to sharepoint and preserve the files permission settings

Steel Contributor

We want to move the files/folders from a user's OneDrive to a sharepoint document library. now i followed the step mentioned in this link @ Move files and folders between OneDrive and SharePoint mainly by selecting the folders from the user's onedrive and "Copy To" the sharepoint library >> where the folders and files got moved, but the files and folders permissions did not get preserved. for example i have a folder which has been shared with 2 users inside the onedrive, but when i "Copy To", the folder will inherit the permission from the destination sharepoint library. 

10 Replies

Hi @john john ,

 

Move To will move the file and all of its version history; Copy To will only copy the most recent version. Unfortunately, neither action retains file permissions. 

 

I believe that in order to retain file permissions, you will have to use a PowerShell script or a migration tool such as ShareGate. I've personally had a lot of success using ShareGate's migration tool. 

 

 

 


@Kimberly Roetman wrote:

Hi @john john ,

 

Move To will move the file and all of its version history; Copy To will only copy the most recent version. Unfortunately, neither action retains file permissions. 

 

I believe that in order to retain file permissions, you will have to use a PowerShell script or a migration tool such as ShareGate. I've personally had a lot of success using ShareGate's migration tool. 

 

 


@Kimberly Roetmanmy main concern is with preserving the permissions rather than versions, i also use to have sharegate migration tool license and i were not happy with it, especially when doing large migration.

But now i do not have any migration tool license, so can you provide me with some power-shell scripts to do such as migration, from onedrvie to sharepoint online and mainly preserve the files/folders permissions?

@john john - I found this one via a Google search, but haven't personally used it. I still have a year or so left for my ShareGate license, so thankfully I haven't had to resort to PowerShell. (I'm not a PowerShell expert by any means)

 

https://sharepoint.stackexchange.com/questions/41884/copy-a-folder-from-one-library-to-another-and-m...

 


@Kimberly Roetman wrote:

@john john - I found this one via a Google search, but haven't personally used it. I still have a year or so left for my ShareGate license, so thankfully I haven't had to resort to PowerShell. (I'm not a PowerShell expert by any means)

 

https://sharepoint.stackexchange.com/questions/41884/copy-a-folder-from-one-library-to-another-and-m...


@Kimberly Roetmanthanks for the reply. but the script inside the link you provided is using server-side powershell , while i need to move the files for SharePoint online..

Hi @john john,

 

This is a request we are actually starting to hear more often and it's something the team is beginning to look at (though we don't have a timeframe to offer just yet). Can you help me understand what types of permissions you want to make sure get moved over? Thanks!

 

Stephen Rice

OneDrive Program Manager II

 


@Stephen Rice wrote:

Hi @john john,

 

This is a request we are actually starting to hear more often and it's something the team is beginning to look at (though we don't have a timeframe to offer just yet). Can you help me understand what types of permissions you want to make sure get moved over? Thanks!

 

Stephen Rice

OneDrive Program Manager II


@Stephen Rice  Thanks for your reply and concern. Here are samples of the permissions we like to preserve:-

1. some folders inside the OneDrive will have unique permission and only specific users are granted permission to read/contribute.

2. some files inside the OneDrive have been shared using links.

now the above 2 cases will not be preserved within the files/folders when we use the built-in Move-to and Copy-To options.

i hope this clarify my question.

Thanks

 

Thanks @john john !

 

Do you primarily find yourself moving files from OneDrive to SharePoint or OneDrive to OneDrive? 

 

And this does help clarify the need here. As I said above, nothing specific I can talk about now but this is something we are looking at improving :) Thanks,

 

Stephen Rice

OneDrive Program Manager II

 


@Stephen Rice wrote:

Thanks @john john !

 

Do you primarily find yourself moving files from OneDrive to SharePoint or OneDrive to OneDrive? 

 

And this does help clarify the need here. As I said above, nothing specific I can talk about now but this is something we are looking at improving :) Thanks,

 

Stephen Rice

OneDrive Program Manager II


@Stephen Riceok i got your point, it is good to know that those are in your plan. now in my case we usually receive requests to move files for the users' OneDrives to sharepoint,and i have never receive any request to move files from OneDrive to OneDrive OR from sharepoint to OneDrive. mainly when a user leave the company , and we do not want to loose the user's files, we are asked to move the user's files from OneDrive to a sharepoint document library. and in all the cases which i worked on, the users had define unique permissions for the folders and sometimes on the files levels..

@john john, thanks for confirming!


That is the primary scenario we are looking at tackling so it's always good to hear that matches real world needs :) Thanks for all of your feedback, I really appreciate it!

 

Stephen Rice

OneDrive Program Manager II

@Stephen Rice Did you ever make any progress on this?  I have a similar goal, but I'm actually trying to copy between document libraries on the same SharePoint site.  The research I've done sounds like it will lose permissions set on folders, but retain permissions on files.  I really need to retain all permissions.