none
How to disable auto follow people from team

    Question

  • Hi

    After provisioning my site portal I realized the people from my team are auto followed.

    I wanted to stop that and delete all the existing auto followed associations ?

    I tried Permission for the User Profile application and realized it doesn't affect the existing associations.

    Do I need to change the policy called "Auto-Follow People from team" ? Is so could someone give me how to do that ? I tried but I couldn't get it to work.

    Thanks a lot,


    Dineth

    Tuesday, June 3, 2014 8:03 PM

Answers

  • Hi,

    According to your post, my understanding is that you wanted to disable auto follow people from team.

    In SharePoint Server 2013, Central Administration contains new policy settings for the User Profile service application and My Sites. These settings appear on the Manage Policies page of the User Profile service application. There are two new sections that display privacy and people settings.

    The following are updated settings under People Settings:

    • People on My Site
    • Auto-follow people from team
    • People Recommendations

    You can change the policy called "Auto-Follow People from team" by using the SharePoint Central Administration website. To display the Manage Policies page, in the browser, on the Manage Profile Service page, in the People section, click Manage Policies.

    Then you can select "Auto-Follow People from team" to edit policy.

    Here is a similar thread for your reference:

    http://www.sharepointanalysthq.com/2011/03/magically-appearing-colleagues-in-sharepoint-2010/

    More information:

    http://technet.microsoft.com/en-us/library/jj219766(v=office.15).aspx

    Thanks,

    Linda Li                

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Linda Li
    TechNet Community Support


    Wednesday, June 4, 2014 8:28 AM
  • To remove existing associations you can try something like this.

    Note, this will remove all the follows each user has to other users in the site. Even if the user wanted to follow that person for other reasons. But there is no way to tell.

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
    $web = Get-SPWeb https://www.contoso.com/teams/yourteam
    $context = [Microsoft.SharePoint.SPServiceContext]::GetContext([Microsoft.SharePoint.SPSite]$web.Site)
    $upm =   New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager $context 
    $users = $web.AssociatedMemberGroup.Users | where IsDomainGroup -eq $false
    $useraccounts = $users | select loginname | Foreach {"$($_.loginname)"}
    
    foreach ($user in $users) {
        $profile = $upm.GetUserProfile($user.UserLogin) 
        #$objectToFollowRelativeToWeb = "/"
        if ($profile)
        {
            #Create a Social Manager profile
            #SPSocialFollowingManager 
            $followManager = New-Object Microsoft.Office.Server.Social.SPSocialFollowingManager($profile, $context)
            $following = $followManager.GetFollowed([Microsoft.Office.Server.Social.SPSocialActorTypes]::Users)
            for ($i=$following.Count - 1; $i -ge 0; $i--) {
                $followed = $following[$i]
                $acctname = $followed.AccountName
                #if claims:
                $acctname = 'i:0#.w|'+$acctname
                if ($acctname -iin $useraccounts ) {
                    [Microsoft.Office.Server.Social.SPSocialFollowResult]$res = $followManager.StopFollowing($followed)
                    Write-Verbose "$($user.UserLogin) stop following $acctname result is $res"
                }
            }
    
        }
    }
    

    Thursday, June 5, 2014 3:41 PM

All replies

  • Hi,

    According to your post, my understanding is that you wanted to disable auto follow people from team.

    In SharePoint Server 2013, Central Administration contains new policy settings for the User Profile service application and My Sites. These settings appear on the Manage Policies page of the User Profile service application. There are two new sections that display privacy and people settings.

    The following are updated settings under People Settings:

    • People on My Site
    • Auto-follow people from team
    • People Recommendations

    You can change the policy called "Auto-Follow People from team" by using the SharePoint Central Administration website. To display the Manage Policies page, in the browser, on the Manage Profile Service page, in the People section, click Manage Policies.

    Then you can select "Auto-Follow People from team" to edit policy.

    Here is a similar thread for your reference:

    http://www.sharepointanalysthq.com/2011/03/magically-appearing-colleagues-in-sharepoint-2010/

    More information:

    http://technet.microsoft.com/en-us/library/jj219766(v=office.15).aspx

    Thanks,

    Linda Li                

    Forum Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Linda Li
    TechNet Community Support


    Wednesday, June 4, 2014 8:28 AM
  • To remove existing associations you can try something like this.

    Note, this will remove all the follows each user has to other users in the site. Even if the user wanted to follow that person for other reasons. But there is no way to tell.

    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
    $web = Get-SPWeb https://www.contoso.com/teams/yourteam
    $context = [Microsoft.SharePoint.SPServiceContext]::GetContext([Microsoft.SharePoint.SPSite]$web.Site)
    $upm =   New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager $context 
    $users = $web.AssociatedMemberGroup.Users | where IsDomainGroup -eq $false
    $useraccounts = $users | select loginname | Foreach {"$($_.loginname)"}
    
    foreach ($user in $users) {
        $profile = $upm.GetUserProfile($user.UserLogin) 
        #$objectToFollowRelativeToWeb = "/"
        if ($profile)
        {
            #Create a Social Manager profile
            #SPSocialFollowingManager 
            $followManager = New-Object Microsoft.Office.Server.Social.SPSocialFollowingManager($profile, $context)
            $following = $followManager.GetFollowed([Microsoft.Office.Server.Social.SPSocialActorTypes]::Users)
            for ($i=$following.Count - 1; $i -ge 0; $i--) {
                $followed = $following[$i]
                $acctname = $followed.AccountName
                #if claims:
                $acctname = 'i:0#.w|'+$acctname
                if ($acctname -iin $useraccounts ) {
                    [Microsoft.Office.Server.Social.SPSocialFollowResult]$res = $followManager.StopFollowing($followed)
                    Write-Verbose "$($user.UserLogin) stop following $acctname result is $res"
                }
            }
    
        }
    }
    

    Thursday, June 5, 2014 3:41 PM
  • Hi Jason/Chris,

    The above script only works for AssociatedMemberGroup of the site. If I want to change it to run for all users present in User Profile service application

    $upm =   New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager $context 
    $users = $upm.GetEnumerator() 
    $useraccounts = $users | select loginname | Foreach {"$($_.loginname)"}
    

    It fails to get User  Accounts.

    Could you please guide me.


    Thanks Ba$va

    Thursday, August 21, 2014 3:17 PM