shravan mj

shravan mj

  • 2.1k
  • 32
  • 4.7k

Not able to unfollow followed sites in mysite

Feb 10 2017 3:35 PM
Hi Geeks,
I have SP 2013 on prem and stuck with an issue. I have an user who had followed sites when the site url was http. Now SSL is configured and all sites start with Https url. Problem is user is not able to unfollow these sites and when I found the logs Could not stop following the item Exception: ItemDoesNotExist : Item does not exist
I tried to ran the below powershell script but no success

if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) {

Add-PSSnapin "Microsoft.SharePoint.PowerShell"


$siteUrl = "https://xx/applications/Test"

$userName = "contosso\admin"

# Load site and user profile service

$site = Get-SPWeb $siteUrl

$serviceContext = Get-SPServiceContext($

$profileManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)

if ($profileManager.UserExists($userName)) {

# Load user profile

$userProfile = $profileManager.GetUserProfile($userName)

# Load social following manager

$followingManager = New-Object Microsoft.Office.Server.Social.SPSocialFollowingManager($userProfile, $serviceContext)

# Prepare following object

$actorInfo = New-Object Microsoft.Office.Server.Social.SPSocialActorInfo

$actorInfo.ContentUri = $site.Url

$actorInfo.AccountName = $userProfile.AccountName

$actorInfo.ActorType = "Site"

# Add to followed sites



 Could you help me what else can be done.
 Thanks in advance

Answers (2)