Restore A Deleted OneDrive For Business Site

This blog will help you to understand OneDrive for business and how to create and restore a deleted OneDrive for Business account.

Let us begin with the basic topic first.

What is One Drive for Business?

One Drive for Business is nothing but a replacement of Mysite in SharePoint family. In SharePoint 2010 & 2013, we have a feature called Mysite where we can store and share our personal data to our collogues and MySite works as  Social Media -- you can post a comment, like, and share (just like Facebook).

So, in Office 365 subscription, Microsoft has brought a good idea to collaborate your personal data to your organizational colleagues or external parties like clients and vendors, just like what you have been doing in SharePoint document library.

OneDrive for Business won’t be created by default. Once you have subscribed, every user needs to click the OneDrive icon from the Office 365 tiles, then only it will get provisioned to use.

SharePoint 

Normally, the OneDrive account will be created in the following URL format
https://tenant-my.sharepoint.com/personal/thivagar_segar_oss-pdy_com

And, you can configure the storage limit, retention policy, synchronize policy, sharing policy at OneDrive Admin center by accessing the URL https://admin.onedrive.com

Where we can check the User’s OneDrive Profile 

Just go to SharePoint Admin Center, locate the user profiles, and under people, click "Manage user profiles".

SharePoint 

Search the user’s OneDrive using user UPN as below.

SharePoint 

So once the user principle name is deleted from the Active Directory, the user OneDrive will move to Soft Delete (Temporary deletion) and the default retention policy is 30 days (You can increase the retention period using the OneDrive Admin center). After completion of 30 days, the user OneDrive will be deleted permanently.

Usually, when the user’s OneDrive goes for deletion permanently, the user’s manager or secondary administrator will receive an auto e-mail from the sharepointonline.com before 7 days.

So for recovering the deleted OneDrive Account, open the SharePoint Management Shell.

#connect the SharePoint Online
Connect-SPOService -URL https://tenant-admin.sharepoint.com

#list out the deleted sites
Get-SPODeletedsite -IncludePersonalSite -Identity https://tenant-my.sharepoint.com/personal/thivagar_segar_oss-pdy_com

#Restore the Deleted Site
Restore-SPODeletedSite -Identity https://tenant-my.sharepoint.com/personal/thivagar_segar_oss-pdy_com

Conclusion

Most probably, this scenario will help you when the employee has re-joined the company or when the user’s manager asks to restore the user’s OneDrive Document.