INTRODUCTION
I have updated a user’s details in Active Directory (in this instance surname and email). I re-run the User Profile sync service and all is well. When I check the User Profile in User Profile Service Application the details are all updated correctly.
When the user login to SharePoint however, the “Welcome” text still says the old surname. When he clicks “My Settings”, that page is still displaying old details.
RESOLUTION
After some reading and investigation I realise that SharePoint uses a separate database from User Profile Service. When the User Profile Service is updated, it’s unnecesarily that the SP user database is updated.
Therefore, the solution to this is to explicitly tell SharePoint to update and sync the user database. To do this:
1. Run:
stsadm -o sync -listolddatabases <n> ==> n stands for the number of days.
stsadm -o sync -listolddatabases 0 ==> Set it to “0” will make it to list all content databases from all sites in your SP farm.
This will display the list of web applications and the date of which the SP user list is last synched with the User Profile Service application.
In my case there are 2 sites which last sync was completed 2 weeks ago which was prior to the updated user profile (hence why in those 2 SP webs the logon welcome text is incorrect).
2. Then I force delete these “old” databases by running:
stsadm -o sync -deleteolddatabases 30 ==> Again the “30” denotes the number of days.
Don’t worry this command will NOT delete anything other than removing the “cache” for those specific SP user databases. No physical database is detached nor removed from SQL.
3. After that I force run the sync process:
stsadm -o sync
4. As a final check, run the following again:
stsadm -o sync -listolddatabases 0
You should see an updated list with the date of when you run the force sync command (ie. today). Then, your users should be updated correctly.
LAST RESORT RESOLUTION
When the above process failed then run the following through Powershell:
$web = Get-SPWeb http://intranet
$web|Set-SPUser -identity “TFS\tsegoro <ie. the updated account>” -SyncFromAD
That’s it. The above command will explicitly update the details for that particular user account.
Hope this helps,
Tommy