How to prevent and ex-user onedrive from being deleted?

Temuca 0 Reputation points
2023-05-17T19:39:54.2633333+00:00

We have a former employee that handled a lot of delicate subjects. Their account is in retention for the next 365 days.

However, for this specific user their manager asked us to prevent their files from being deleted at all. I understand that creating a backup would be the simpler solution, however my manger requested that this be done via sharepoint properties.

I've found a few articles on how to set up retention periods, assing ownership of the retained files etc. But I have not found a way to prevent them from being deleted on the sharepoint admin center.

Anyone know how to get this done?

Microsoft 365 and Office | SharePoint | For business | Windows
Microsoft 365 and Office | OneDrive | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 31,606 Reputation points Microsoft External Staff
    2023-05-18T08:18:37.2633333+00:00

    Hi @Temuca ,

    Regarding the permanent retention of the former user's OneDrive data, currently, there are only two methods available.

    • Access a former user's OneDrive documents

    Give yourself access to their OneDrive, and then move the files you want to keep.

    1. In the admin center, go to the Users > Active users page.
    2. Select the user.
    3. On the user properties page, select OneDrive. Under Get access to files, select Create link to files.
    4. Select the link to open the file location. Download the files to your computer, or select Move to or Copy to to move or copy them to your own OneDrive or to a shared library.

    And you can also grant access to another user to access a former employee's OneDrive.

    For more information, please refer to:

    https://learn.microsoft.com/en-us/microsoft-365/admin/add-users/remove-former-employee-step-5?view=o365-worldwide

    • Restore user data

    If the user was deleted within 30 days, you can restore the user and all their data from the Microsoft 365 admin center. To learn how, see Restore a user in Microsoft 365. If you deleted the user more than 30 days ago, the user will no longer appear in the Microsoft 365 admin center, and you'll need to use PowerShell to restore the OneDrive.

    1. Download the latest SharePoint Online Management Shell.
    2. Connect to SharePoint as a global admin or SharePoint admin in Microsoft 365. To learn how, see Getting started with SharePoint Online Management Shell.
    3. Determine if the OneDrive is available for restore.
      • If you know the URL of the OneDrive, run the following command:
             Get-SPODeletedSite -Identity <URL>
        
        A user's OneDrive URL is based on their username. For example, https://contoso-my.sharepoint.com/personal/user1_contoso_com. You can find their username on the Active users (or Deleted users) page in the Microsoft 365 admin center.
      • If you don't know the URL of the deleted OneDrive, run the following command:
          Get-SPODeletedSite -IncludeOnlyPersonalSite | FT url
        
      • If the OneDrive appears in the results, it can be restored.
    4. Restore the OneDrive to an active state:
        Restore-SPODeletedSite -Identity <URL>
      
    5. Assign an administrator to the OneDrive to access the needed data:
        Set-SPOUser -Site <URL> -LoginName <UPNofDesiredAdmin> -IsSiteCollectionAdmin $True
      

    For more information, please refer to:

    https://learn.microsoft.com/en-us/sharepoint/restore-deleted-onedrive


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.