I'm looking for a way to copy files from a OneDrive account to a SharePoint site for archival purposes, specifically for data belonging to a terminated employee. Does anyone have a script or a method to facilitate this transfer?
5 Answers
While it's technically true that OneDrive and SharePoint have overlapping features, it doesn't really help clarify things. What specific action are you trying to achieve?
In my last job, we just manually downloaded the files from OneDrive via a link and then uploaded them to the SharePoint site. If you're thinking about automation, rclone might be your best bet for a straightforward approach.
I get what you're saying, but my main goal here is to archive files without the complexities of ongoing licensing.
Using Power Automate would be a solid option since it handles cloud-to-cloud transfers well. You'll also need the PnP.PowerShell module if you decide to go with PowerShell. Just make sure to create an app registration in Azure for proper access—it might be a bit of a hassle but totally doable. If you're interested in speed, Power Automate is definitely worth checking out!
I get where you're coming from, but Power Automate can get tricky long-term due to lack of source control. I'd recommend setting up a script in an Azure runbook with a managed identity for easier authentication.
This whole thing is a bit confusing. SharePoint and OneDrive are usually considered the same under the Microsoft umbrella, right? What's exactly the goal here?
It's true that they're interconnected, but they're often licensed separately. The OP probably wants to archive the OneDrive data of a terminated employee without needing to maintain an Office 365 license for them indefinitely.
While PnP.PowerShell isn't strictly necessary, you'll need the Az graph modules instead. Plus, using machine identities could simplify things, especially if your on-prem servers are registered in ARC. I have a script that syncs OneDrive to local storage that eventually goes to Azure Files, which runs nightly, but rclone is worth trying out first to see if it fits your needs.