Forum Discussion

Lloyd Adams's avatar
Lloyd Adams
Iron Contributor
Jun 12, 2019

Are OneDrive folders really being deleted?

I've just exported the OneDrive usage report, and I was very surprised to see it still listing OneDrive details for users who left a long time ago.  The accounts have been deleted, and managers are getting emails telling them that the OneDrives will be deleted.  But it appears from this report that the contents are still hanging around.

 

As an admin, how can I confirm if a OneDrive folder is really there (and has contents)?

  • Use SharePoint Online Powershell
    connect-sposervice
    https://tenant-admin.sharepoint.com

    set-spouser -identity "url to the onedrive" -loginname youraccount -issitecollectionadmin $true

    Preservation policies can hold it, and or there is a setting in onedrive admin for number of days to keep onedrive data as well, check those, but there is something like 91 days give or take where those sites will hang around even after the site is removed from deleted users.

  • Lou_Mickley's avatar
    Lou_Mickley
    Brass Contributor

    Lloyd Adams - if the user is deleted from O365, the OneDrive folders/files will be retained for the duration specified in OneDrive Admin > Storage parameter.  Default is 30-days, but can be set for up to 3650 days. So yes, the files can outlast the user in O365.

    • Lloyd Adams's avatar
      Lloyd Adams
      Iron Contributor

      We still have default settings, and double checked that retain time is still 30 days.  As a manager, I get 30 and 7 day warning emails.

       

      Looking closer at the report, there is a Boolean field 'Is Deleted'.  This seems to get set after the 30 day period.  I can no longer access any of the OneDrive urls where this flag is set.  If they are really deleted, why are they included in the report, and where is the information on number of files, storage used etc. coming from?

      • NiteshRanjan's avatar
        NiteshRanjan
        Copper Contributor
        The OneDrive deleted after number of days configured in the OneDrive admin center will be retained in recycle bin. Microsoft retains the OneDrive in this recycle bin for 93 days and can be recovers using below power Set-SPOUser -Site https://<tenant-id>-my.sharepoint.com/personal/first_last_domain_com -LoginName first.last@domain.com -IsSiteCollectionAdmin $false -ErrorAction SilentlyContinue

Resources