-1

The list of sites in the Harmon.ie sidebar in Outlook is also showing deleted sites. Is there a way to prevent this?

Thank you

SteveP
  • 385
  • 2
  • 11

2 Answers2

0

I believe you do not refer to a subsite of a registered site collections but to a site that has been explicitly registered via our UI, is that correct? In such case, we do not identify that the site has been deleted because Sharepoint does not return such information. You can temporarily get a 404 error because of some network issue …

Jean
  • 126
  • 2
  • 3
0

Thanks to the great support from Jean from harmon.ie I was able to sort this out.

The list of sites I was seeing in the harmon.ie sidebar included sites I was following, most of which had been deleted from SharePoint (we'd been doing a lot of testing and configurarion). Deleting a site from SharePoint does not remove it from users' followed sites list, which is actually stored in a hidden folder with their OneDrive.

The Solution. Clean up the sites you are following using PnP PowerShell (This will remove all of your followed sites).

  1. Connect to your one drive:

    Connect-PnPOnline -Url https://-my.sharepoint.com/personal/ -Credentials (Get-Credential)

  2. Run the following:

    $followedSitesUrl = "/personal/<YOUR USER SITE/Social/Private/FollowedSites"

    $sites = Get-PnPListItem -List Social -Query "$followedSitesUrl"

    $sites |% { Remove-PnPListItem -List Social -Identity $_.ID -Force }

SteveP
  • 385
  • 2
  • 11