Forum Discussion

Lars Hetner Elkjer Mortensen's avatar
Nov 04, 2020

Change owner of deleted OneDrive profile

Hi

 

Assuming I have NOT setup manager or secondary admin - I have deleted a user from Office356 and the retention period isn't expired.

 

How can I access "configuration" of the OneDrive, and add an Owner of the OneDrive so I can access it and view data?

 

I would have thought that I could find it in the "Manage User Profiles" in SharePoint Admin Center but the user doesn't show up when searching.

 

Regards Lars Mortensen

  • Lars Hetner Elkjer Mortensen 

    Easy, Just use these steps to assign a secondary owner. 

    1.  Connect to SharePoint online PowerShell using Connect-SPOService

    2.  Run "Get-SPODeletedSite -IncludePersonalSite | FT url" to get the list of deleted personal sites

    4. Sometimes it may not appear in the above list but you can run this command to set a new secondary site collection admin. At this point, you can assign yourself first and see if you can access it. Then Assign to the right person.

    Set-SPOUser -Site https://domain-<my.sharepoint.com/personal/firstname_lastname_domain_com/_layouts/15/onedrive.aspx> -LoginName <username@domain.com> -IsSiteCollectionAdmin $True -ErrorAction SilentlyContinue

     

    5. Now try to access the above MySite URL and you should be able to set permissions directly from there too. To do that go to OneDrive Settings --> More Settings --> Site Collection Administrators --> Add/Remove people here as per the needs

  • Lars Hetner Elkjer Mortensen 

    Easy, Just use these steps to assign a secondary owner. 

    1.  Connect to SharePoint online PowerShell using Connect-SPOService

    2.  Run "Get-SPODeletedSite -IncludePersonalSite | FT url" to get the list of deleted personal sites

    4. Sometimes it may not appear in the above list but you can run this command to set a new secondary site collection admin. At this point, you can assign yourself first and see if you can access it. Then Assign to the right person.

    Set-SPOUser -Site https://domain-<my.sharepoint.com/personal/firstname_lastname_domain_com/_layouts/15/onedrive.aspx> -LoginName <username@domain.com> -IsSiteCollectionAdmin $True -ErrorAction SilentlyContinue

     

    5. Now try to access the above MySite URL and you should be able to set permissions directly from there too. To do that go to OneDrive Settings --> More Settings --> Site Collection Administrators --> Add/Remove people here as per the needs

Resources