I'm looking for a way to move files from a OneDrive account, specifically from a former employee, to our SharePoint Archive Site for archival purposes. If anyone has a script or method to do this, I'd really appreciate your input!
4 Answers
At my last job, we just did the manual method: link to the OneDrive, download files, then upload them to SharePoint. Not the most efficient, but it worked for us. If I were to automate it now, I'd check out rclone first.
This is a bit confusing since SharePoint and OneDrive are essentially linked. Are you sure you want to separate them, or is there something specific you're trying to achieve with the archiving that requires this?
Using Power Automate for this task could be really effective, as it keeps everything in the cloud without needing to download files. If you prefer PowerShell, you'll want the PnP.PowerShell module and an app registration in Azure for connection. It’s a bit of a hassle but totally doable. Check out Power Automate for a potentially faster solution!
I totally agree! Power Automate might end up being a pain long-term due to issues with source control. Instead, consider using an Azure runbook with a managed identity, which simplifies the auth process.
I mean, technically you're right that OneDrive is a part of SharePoint, but they’re licensed differently. I'm guessing the user just wants to archive the files without keeping the O365 license for the terminated employee.
You don’t necessarily need the PnP.PowerShell module. The Az graph modules work too, plus you can use machine identities for access, especially if your servers are registered on-prem with Azure ARC. I also have a PowerShell script that syncs OneDrive to Azure Files for long-term archiving if you're interested!