Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Consider the following scenario:

  • You have a SharePoint Server 2010 environment with a working User Profile Service Application

  • You have not installed August 2010 Cumulative Update or later for SharePoint server 2010

  • You have detached and attached a content database which contains several site collections


In this scenario, after attaching the database back to its web application, the membership information of some site collections changes and do not appear on the 'Memberships' tab of 'My Profile' of the affected users. The membership information which is visible for users will be stale.

Cause

Microsoft acknowledges this to be a product issue regarding cleanup of removed site collections which was fixed in August 2010 cumulative update for SharePoint 2010 (Server package KB 2352342 ). However this fix does not affect site collections which got into this state by detaching their databases prior to the hotfix installation. To restore membership synchronization for these affected site collections, please follow the resolution steps.

Resolution

Follow the steps outlined below to restore Membership information synchronization between content database and profile database for all site collections.

Warning:

  • During this procedure all current SharePoint Group related membership information will be deleted from the Profile database and users will not be able to see their complete 'Membership' information until the "User Profile to SharePoint Full Synchronization job" processes all site collections successfully.

  • The following timer job should be disabled while the steps are performed:

    "{UPA} User Profile to SharePoint Full Synchronization" job where {UPA} is the name of your User Profile Service Application.


Open SharePoint 2010 Management Shell on the machine hosting the Central Administration as a local administrator user who is also a member of the farm administrators group and has 'Full Control' permissions on the User Profile Service Application.

Replace the url in the first line of the following Powershell script snippet to one of your affected site collections (this code snippet only needs to be executed once and will remove current membership groups from the User Profile Application)

$url = "http://server/sites/sitecoll";
$SPSite = get-spsite $url;
$context = [Microsoft.SharePoint.SPServiceContext]::GetContext($SPSite)
$manager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager $context

$sourceMethod = [Microsoft.Office.Server.UserProfiles.MemberGroup].getmethod("get_Source")
$deleteMethod = [Microsoft.Office.Server.UserProfiles.MemberGroup].getmethod("Delete")
foreach ($memberGroup in $manager.GetMemberGroups())
{
if ($sourceMethod.Invoke($memberGroup, @()) -eq "SharePointSite")
{
$deleteMethod.Invoke($memberGroup, @())
}
}


Once this PowerShell script completes, please run the following command to schedule new synchronization for the content databases.

Stsadm -o sync -deleteolddatabases 0 


Now run the following Powershell script to schedule a 'Full Membership Synchronization' of all site collections in your farm.

Get-SPSite -limit all | % {[Microsoft.Office.Server.UserProfiles.WSSProfileSynch]::ScheduleSiteForFullSynchronization($_); $_.Close()}

Post this, follow the steps listed below

  • Open Central administration, click on 'Review job Definitions' page under the 'Monitoring' section

  • Locate the Timer Job "{UPA} User Profile to SharePoint Full Synchronization" job where {UPA} is the name of your User Profile Service Application.

  • Click on the Job's title and click 'Run now'.

  • Once the job completes, the membership information will be up-to-date and will be synchronized automatically during subsequent runs for previously affected site collections.

More Information

Schedule profile synchronization (SharePoint Server 2010)
Timer job reference (SharePoint Server 2010)

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×