OneDrive third party access and data transfer

I am not sure if this feature is already available or if it is hard to implement; I am pretty much in the cloud right now.

My use case is that I want to transfer (or copy) files from one OneDrive account (tenant one) to another OneDrive account (tenant two). I can access the OneDrive files of the members of the tenant remotely using a link created using an administrator account. I think the same is possible on Google Workspace using service accounts. So, I want to transfer (or copy) the OneDrive content using the created link to a different tenant using Rclone.

Instead of connecting the member account as a remote on Rclone, is it possible to do the above-said task using the created link?

I have combed through the OneDrive section in Rclone documentation but couldn't find this particular scenario. Please guide me if I have missed something.

PS: The whole task is done with the consent of the members, and the mission is to wholly have all members' data on tenant two (completely fine to do the job one member at a time).

Just a bump. I am getting more confused as I am starting to doubt if I have typed something wrong. Can anyone guide me if there are any mistakes above?

Hi Yolo,

Not expert in tenant to tenat copies, but perhaps you can add the shared folders to "My files" where rclone can see and copy the files:

You may also be able to find more tips in this GitHub issue:

Hey Ole,

Thanks for the workaround. However, this will not work with the above-said scenario. I can create a link to access the files, but it will not appear in the shared with me section.

OK, I would have expected so, but again not expert in this area. Let's hope somebody else in the forum can help.

Perhaps it would help if you post the (redacted) link/URL, how your created it and what you see when accessing it.

Rclone doesn't understand the links - they need to be interpreted by the onedrive web app I think.

However if you can find the folder ID of the folder you need to copy you may be able to get it to work by passing that in as --onedrive-root-folder-id

This is correct. The link would look like a direct link with the SharePoint site address as the head. The folder id won't work as well because the link created works as though the root user is accessing onedrive.

So, is this something that can be implemented @ncw @albertony ?

Businesses would appreciate it if this could be an available feature, as data migration is a headache when changing tenants and providers. Donations can also be acquired when used on a commercial basis, I guess.

It depends on whether we can undo the link in the onedrive API or not.

I didn't understand this - folder IDs are unique and absolute aren't they?

Well, it is hard to know what is happening when the said link is created. I will check and see if the folder id remains the same after making the link and during the user account login.

I don't know if relevant, but did your check this: Implement one drive client credentials by martin-redmaple · Pull Request #6343 · rclone/rclone · GitHub

This is quite relevant, I assume. This might be a massive feature if it is impossible to be added. It will resolve a lot of hassle when it comes to tenant-based transfers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.