Delete this list” Missing in SharePoint online- Can someone help with this please?

Sayeed Sediqi 21 Reputation points
2021-07-07T18:10:34.103+00:00

Delete this list” Missing in SharePoint online- Can someone help with this please?

112584-capture1.jpg

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

Accepted answer
  1. JoyZ 18,111 Reputation points
    2021-07-08T06:02:38.83+00:00

    @Sayeed Sediqi ,

    First of all, make sure you have the enough permission to delete lists:

    112872-image.png
    If the user permission is right, please go to list settings to check if you could see following option:

    112845-image.png

    If none of the above works, we can turn ON allow deletion flag and then delete a list by sending it to recycle bin in SharePoint Online with PowerShell-CSOM:

    #Load SharePoint CSOM Assemblies  
    Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"  
    Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"  
        
    #Set parameter values  
    $SiteURL="https://test.sharepoint.com/sites/Team1"  
    $LibraryName="list75"  
      
       
    Try {  
        #Get Credentials to connect  
        $Cred= Get-Credential  
        $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)  
         
        #Setup the context  
        $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)  
        $Ctx.Credentials = $Credentials  
        
        #Get the Document Library and set allow deletion flag  
        $Library=$Ctx.Web.Lists.GetByTitle($LibraryName)   
        $Library.AllowDeletion = $True  
        $Library.Update()  
        $Ctx.ExecuteQuery()  
                    
        #Delete the Document Library (Send to Recycle bin)  
        $Library.Recycle() | Out-Null  
        $Ctx.ExecuteQuery()  
        
        Write-Host "Document Library: '$LibraryName' has been Deleted Successfully!" -ForegroundColor Green    
    }  
    Catch {  
        write-host -f Red "Error Deleting Document Library!" $_.Exception.Message  
    }  
    

    If an Answer is helpful, please click "Accept Answer" and upvote it.

    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.


0 additional answers

Sort by: Most helpful

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.