Home

Downloading a user's OneDrive data

%3CLINGO-SUB%20id%3D%22lingo-sub-469947%22%20slang%3D%22en-US%22%3EDownloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-469947%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20our%20organization%2C%20before%20we%20started%20moving%20people%20to%20OneDrive%2C%20we%20moved%20the%20user's%20home%20directory%20to%20a%20backup%20location%20and%20deleted%20the%20directory%20from%20the%20our%20storage.%20This%20was%20done%20with%20a%20PowerShell%20script%20that%20would%20also%20remove%20the%20user%20completely%20from%20active%20directory.%3C%2FP%3E%3CP%3EI%20need%20a%20way%20to%20do%20the%20same%20thing%20for%20a%20user%20that%20it's%20data%20is%20in%20OneDrive.%20I%20know%20I%20can%20download%20files%20from%20a%20SharePoint%20site%20with%20the%20PowerShell%20SharePoint%20snap-in.%20But%20I%20want%20to%20do%20this%20from%20a%20computer%20that%20isn't%20a%20SharePoint%20server%20with%20the%20SharePoint%20module.%20Unless%20there%20is%20another%20way.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20Rahamim.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-469947%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-470038%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-470038%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F255442%22%20target%3D%22_blank%22%3E%40RahamimL%3C%2FA%3E%26nbsp%3Byou%20can%20make%20yourself%20the%20SiteCollection%20owner%20(%20You%20need%20SharePoint%20Online%20Administrator%20access%20for%20this)%26nbsp%3B%20of%20the%20users%20oneDrive%20.%20Navigate%20to%20the%20users%20oneDrive%20and%20use%20the%20OneDrive%20Sync%20Client%20to%20Sync%20the%20user%20OneDrive%20content.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-470104%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-470104%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F184117%22%20target%3D%22_blank%22%3E%40Maruthi%20Gadde%3C%2FA%3EI%20want%20to%20automate%20everything%20via%20script%20and%20not%20doing%20it%20manually.%20I%20can%20give%20the%20site%20ownership%20to%20a%20site%20via%20the%20script.%20The%20only%20problem%20is%20how%20can%20I%20download%20the%20content%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-473740%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-473740%22%20slang%3D%22en-US%22%3EWhy%20download%20the%20content%3F%20Just%20leave%20it%20in%20place%20and%20give%20anyone%20that%20needs%20access%20access%20to%20the%20document%20over%20time.%20Long%20as%20you%20set%20a%20preservation%20to%20store%20it%20for%20a%20long%20time%20you%20are%20good.%20Much%20easier%20than%20trying%20to%20shift%20files%20around%20and%20it%20doesn%E2%80%99t%20eat%20into%20your%20licensing%20%2F%20storage.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-476432%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-476432%22%20slang%3D%22en-US%22%3EWe're%20talking%20about%20a%20user%20that%20left%20the%20organization.%3CBR%20%2F%3EWe%20want%20to%20move%20the%20user's%20data%20to%20a%20backup%20tape%20and%20we%20already%20have%20a%20script%20that%20does%20this%20for%20users%20on%20our%20local%20storage.%20Now%20we%20want%20the%20script%20to%20do%20the%20same%20thing%20for%20users%20in%20OneDrive.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-476465%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-476465%22%20slang%3D%22en-US%22%3EYeah%20and%20so%20am%20I.%20Why%20waste%20the%20tape%20and%20time%20doing%20that%20when%20you%20can%20just%20mark%20set%20OneDrive%20preservation%20and%20keep%20the%20data%20as%20long%20as%20you%20would%20tape%2C%20in%20place%20for%207%20years%20or%20whatever%20you%20wanted%20and%20skip%20that%20step.%20You%20delete%20the%20user%20the%20data(site)%20stays%20for%20as%20long%20as%20the%20preservation%20is%20set.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477122%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477122%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F869%22%20target%3D%22_blank%22%3E%40Chris%20Webb%3C%2FA%3Eyou%20have%20a%20point%20there%2C%20and%20I'll%20have%20to%20check%20that%20with%20my%20boss.%3C%2FP%3E%3CP%3E2%20questions%20than%3A%3C%2FP%3E%3COL%3E%3CLI%3EWe're%20a%20hybrid%20environment%20and%20we%20normally%20build%20the%20user%20in%20AD%20with%20a%20mailbox%20and%20migrate%20it%20to%20365.%20we%20use%20this%20way%20because%20when%20the%20user%20leaves%20we%20migrate%20the%20mailbox%20back%20to%20export%20the%20mailbox%20to%20a%20PST%20and%20backup%20that%20file.%20Can%20I%20use%20preservation%20the%20same%20way%3F%3C%2FLI%3E%3CLI%3EWhat%20happens%20to%20a%20user%20in%20365%20when%20I%20delete%20it%20in%20AD%3F%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477251%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477251%22%20slang%3D%22en-US%22%3EThey%20get%20marked%20for%20deletion%20in%20365%20and%20deleted%20after%2030%20days.%20However%20if%20you%20have%20the%20Retention%2F%20preservation%20policies%20in%20place%20the%20mailbox%20%2F%20onedrive%20will%20stay%20and%20you%20can%20access%20them%20via%20security%20and%20compliance%20center%20to%20search%20and%20export%20any%20data%20you%20might%20need%20later.%20You%20can%20also%20directly%20access%20them%20if%20needed%20as%20well.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477253%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477253%22%20slang%3D%22en-US%22%3EAnd%20for%20those%20who%20are%20required%20to%20have%20a%20tape%20backup%20what%20do%20you%20suggest%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-477256%22%20slang%3D%22en-US%22%3ERe%3A%20Downloading%20a%20user's%20OneDrive%20data%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-477256%22%20slang%3D%22en-US%22%3ELook%20at%20security%20and%20compliance%20center.%20Should%20be%20able%20to%20search%20the%20onedrive%20and%20then%20export%20that%20data%20that%E2%80%99s%20in%20it%20via%20a%20applet%20(use%20IE)%20to%20download%20everything%20if%20you%20have%20to%20have%20tape.%20There%20are%20also%20backup%20vendors%20that%20can%20talk%20right%20to%20365%20and%20backup%20to%20tape%20too.%3C%2FLINGO-BODY%3E
Highlighted
RahamimL
Contributor

Hi all,

 

In our organization, before we started moving people to OneDrive, we moved the user's home directory to a backup location and deleted the directory from the our storage. This was done with a PowerShell script that would also remove the user completely from active directory.

I need a way to do the same thing for a user that it's data is in OneDrive. I know I can download files from a SharePoint site with the PowerShell SharePoint snap-in. But I want to do this from a computer that isn't a SharePoint server with the SharePoint module. Unless there is another way.

 

Thanks, Rahamim.

9 Replies

@RahamimL you can make yourself the SiteCollection owner ( You need SharePoint Online Administrator access for this)  of the users oneDrive . Navigate to the users oneDrive and use the OneDrive Sync Client to Sync the user OneDrive content. 

@Maruthi GaddeI want to automate everything via script and not doing it manually. I can give the site ownership to a site via the script. The only problem is how can I download the content?

Why download the content? Just leave it in place and give anyone that needs access access to the document over time. Long as you set a preservation to store it for a long time you are good. Much easier than trying to shift files around and it doesn’t eat into your licensing / storage.
We're talking about a user that left the organization.
We want to move the user's data to a backup tape and we already have a script that does this for users on our local storage. Now we want the script to do the same thing for users in OneDrive.
Yeah and so am I. Why waste the tape and time doing that when you can just mark set OneDrive preservation and keep the data as long as you would tape, in place for 7 years or whatever you wanted and skip that step. You delete the user the data(site) stays for as long as the preservation is set.

@Chris Webbyou have a point there, and I'll have to check that with my boss.

2 questions than:

  1. We're a hybrid environment and we normally build the user in AD with a mailbox and migrate it to 365. we use this way because when the user leaves we migrate the mailbox back to export the mailbox to a PST and backup that file. Can I use preservation the same way?
  2. What happens to a user in 365 when I delete it in AD?
They get marked for deletion in 365 and deleted after 30 days. However if you have the Retention/ preservation policies in place the mailbox / onedrive will stay and you can access them via security and compliance center to search and export any data you might need later. You can also directly access them if needed as well.
And for those who are required to have a tape backup what do you suggest?
Look at security and compliance center. Should be able to search the onedrive and then export that data that’s in it via a applet (use IE) to download everything if you have to have tape. There are also backup vendors that can talk right to 365 and backup to tape too.
Related Conversations
Extentions Synchronization
Deleted in Discussions on
3 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
9 Replies