Forum Discussion

IshtarIS's avatar
IshtarIS
Copper Contributor
Nov 10, 2020

Remove non-functional Shared Libraries in OneDrive when Sites have been deleted

Hey Community

 

We have some libraries that were shared quite some time back and appear in users OneDrive Shared library lists.   The sites that hosted these libraries have been deleted however the entries remain.   When selected they produce a very un-useful error (see below).

 

Does anyone have a way to remove non-functional shared library entries from the OneDrive Shared Library lists?

 

Thanks in advance.

 

2 Replies

    • IshtarIS's avatar
      IshtarIS
      Copper Contributor

      KathrynLaskey 

       

      No answers but I dug deep and realised they were artifacts from Sharepoint and Group activities in the Admin console.   For groups I learned a lot from 

      https://docs.microsoft.com/en-au/microsoft-365/admin/create-groups/manage-groups?view=o365-worldwide

      .   I looked at <domain>.sharepoint.com/sites/<site name>/_layouts/15/groups.aspx for abnormal groups and used the PowerShell commands Get-AzureADMSDeletedGroup and Remove-AzureADMSDeletedDirectoryObject to clean up groups.

       

      On the SharePoint side I found https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-online/connect-sharepoint-online?view=sharepoint-ps

      Get-SPODeletedSite and Remove-SPODeletedSite are good to clean up site detritus and Get-SPOSite -Template REDIRECTSITE#0 and Remove-SPOSite to clean up redirects

       

      I hope this Helps

       

Resources