How do I get deleted files back from OneDrive or SharePoint?
The short answer: check the recycle bin first. OneDrive and SharePoint both keep deleted files in a recycle bin, then a second-stage recycle bin, for up to 93 days in total. If a file was changed rather than deleted, use Version history to bring back an earlier copy, and if lots of files were damaged at once, you can roll your whole OneDrive back to any point in the last 30 days.
1. Get a file back from the OneDrive recycle bin
Files you delete from OneDrive, including from the OneDrive folder on your computer, go to the OneDrive recycle bin.
- Go to onedrive.com (or open OneDrive from the Microsoft 365 app launcher) and sign in with your work account.
- Click Recycle bin in the left-hand menu.
- Tick the files or folders you want back.
- Click Restore.
The files go back to where they were originally. If you can't see them, scroll to the bottom of the recycle bin and look for a link to the second-stage recycle bin, then restore from there in the same way.
2. Get a file back from a SharePoint site
Files deleted from a SharePoint site, or from the Files tab in a Microsoft Teams channel, go to that site's recycle bin instead.
- Open the SharePoint site the file lived in.
- Click Recycle bin. It's usually in the left-hand menu, or under Site contents.
- Select the files and click Restore.
- If they're not there, look for the second-stage recycle bin link at the bottom. You may need to be a site owner or admin to see it.
Whichever bin it's in, a deleted item is kept for 93 days from when it was first deleted. After that, it's permanently removed.
3. Restore an earlier version of a file
Sometimes the file isn't deleted at all: someone saved over it, deleted half a spreadsheet, or a sync went wrong. OneDrive and SharePoint keep previous versions of Office files automatically.
- Find the file in OneDrive or SharePoint in your web browser.
- Right-click it (or click the three dots) and choose Version history.
- Look through the list of dates and times. You can open an older version to check it.
- Click Restore on the version you want. It becomes the current version, and the newer one is kept in the history too, so you can't lose anything by trying.
4. Roll back your whole OneDrive
If ransomware has encrypted your files, or hundreds of files have been deleted or renamed in one go, restoring them one at a time isn't realistic. Restore your OneDrive lets you put everything back as it was at an earlier point.
- Go to OneDrive in your web browser.
- Click the Settings cog, then Restore your OneDrive. Depending on your version, it may be under Options.
- Pick a date, or use the activity chart to find the moment things went wrong.
- Click Restore.
You can go back up to 30 days. SharePoint document libraries have a similar option called Restore this library. If ransomware is involved, deal with the infected computer first, or it may simply encrypt everything again. Our guide on how to tell if your email has been hacked covers what to do after a security scare.
5. What about deleted emails?
Deleted emails work a little differently.
- Look in your Deleted Items folder first. Drag anything you need back into your inbox.
- If it's not there, right-click Deleted Items and choose Recover items deleted from this folder (in Outlook on the web), or use Recover Deleted Items in desktop Outlook.
- Select the emails and click Restore.
Emails emptied from Deleted Items can usually be recovered for 14 days by default. An admin can raise this to 30 days.
When the time limits run out
Once those limits have passed, the data is gone, and Microsoft can't get it back for you. The only thing that can help at that point is a separate Microsoft 365 backup that you set up beforehand. Our guide Does Microsoft back up Microsoft 365? explains why that matters, and our free Microsoft 365 audit checks whether you have one.
Common questions
I deleted a file on my laptop. Is it gone from OneDrive too?
If the file was in a folder that syncs with OneDrive, yes. Deleting it on your laptop deletes it everywhere. The good news is that it also goes into the OneDrive recycle bin online, so you can restore it from there.
Can I get back a file a leaver deleted?
Usually, if it was within the last 93 days and their account still exists. If their account has already been deleted, an admin may be able to restore the account within 30 days of deletion and then recover the files.
Why can't I see the second-stage recycle bin?
On SharePoint sites, the second-stage recycle bin is usually only visible to site owners and admins. Ask whoever manages your Microsoft 365 to check it for you.
Is the recycle bin a backup?
No. It's a safety net with a time limit, and anyone with enough access, including an attacker, can empty it. A backup is a separate copy kept somewhere else.
Want us to check yours?
Our free Microsoft 365 audit looks at your licences, security, email and backups, and tells you in plain English what to fix first. No card, no obligation.