2

I am listing all site collections of the company by calling:

/_api/search/query?querytext='contentclass:STS_Site'&trimduplicates=false

Among the returned site collections, some are deleted. When navigating to them in the browser, there shows 404 File not found. And they cannot be seen in both active and deleted site in the new SharePoint admin center.

Is there any way to exclude deleted site collections in the API call? Or is there any way to search for a list of deleted site collections?

Thanks in advance.

  • Mine is SharePoint Online and the deleted site collections are not found in the Get-SPODeletedSite result. I believe they are permanently deleted since they are not seen in "Deleted Sites" in SharePoint admin center. – Justin-pp Feb 6 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.