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

%3CLINGO-SUB%20id%3D%22lingo-sub-1870512%22%20slang%3D%22en-US%22%3ERemove%20non-functional%20Shared%20Libraries%20in%20OneDrive%20when%20Sites%20have%20been%20deleted%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1870512%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20Community%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20some%20libraries%20that%20were%20shared%20quite%20some%20time%20back%20and%20appear%20in%20users%20OneDrive%20Shared%20library%20lists.%26nbsp%3B%26nbsp%3B%20The%20sites%20that%20hosted%20these%20libraries%20have%20been%20deleted%20however%20the%20entries%20remain.%26nbsp%3B%26nbsp%3B%20When%20selected%20they%20produce%20a%20very%20un-useful%20error%20(see%20below).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDoes%20anyone%20have%20a%20way%20to%20remove%20non-functional%20shared%20library%20entries%20from%20the%20OneDrive%20Shared%20Library%20lists%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22IshtarIS_0-1604994671529.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F232522i51E555E3A6789AD1%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22IshtarIS_0-1604994671529.png%22%20alt%3D%22IshtarIS_0-1604994671529.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1870512%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2120129%22%20slang%3D%22en-US%22%3ERe%3A%20Remove%20non-functional%20Shared%20Libraries%20in%20OneDrive%20when%20Sites%20have%20been%20deleted%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2120129%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F734971%22%20target%3D%22_blank%22%3E%40IshtarIS%3C%2FA%3E%26nbsp%3BI%20have%20the%20same%20problem.%20Has%20anyone%20answered%20your%20question%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

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.

IshtarIS_0-1604994671529.png

 

2 Replies

@IshtarIS I have the same problem. Has anyone answered your question?

@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 Get started with the SharePoint Online Management Shell | Microsoft Docs

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