User Profiles: Why do my changes not show in other sites?

A detailed look at how the Sync works

I was asked recently to advise on how to configure a MOSS 2007 installation to allow end users to update their display name as they had previously been able to do in 2003. My initial thoughts on this were that its a simple update of the profile properties to allow them to edit the Name field, however the results achieved in testing appeared inconsistent.

In this article I will show

  • How to setup the profile properties
  • What the user sees and can edit
  • What services/timer jobs are involved in the Sync and how to speed this up for testing
  • The conditions that need to be met to trigger the profile information to be replicated.

Setting Up Profile Properties

The first step is to setup the profile properties. In this example I will be looking at enabling users to edit the display name (“PreferredName”) field. This example assumes that you have MOSS 2007 and a Shared Service Provider has been setup and configured.

From Central Admin choose the Shared Service Provider from the left hand menu. This should display a screen similar to the one below.

SSP Admin

Select the User profiles and properties option as highlighted. This will allow you to add new properties or as in this example edit an existing property.

View properties

Scroll to the bottom of the page and click View profile properties. On the list of properties select the Name field and choose Edit.

Edit Name

The profile properties page allows you to configure the profile property. Ensure that the field selected is the PreferredName field, this has default Display Name of Name.

PreferredName

Check that the field is checked for replication. You will note that the text suggests that properties that can be replicated cannot be edited by the user, however this does not appear to be the case.

Policy Setting Message Error

Choose Allow users to edit values for this property, this will allow the user to change the value via MySite.

Allow Edit

Change the mapping to ‘not mapped’. If you do not change this any modification the user makes will be overwritten at the next profile import.

Note: When a user firsts accesses a site the User Info is extracted directly from AD (or your provider, not tested) and it still pulls the AD based display name into this field as it is not related to the profile mapping.

Mapping

We will look at the different states for the User Info and profile imports below.

The properties page should show the PreferredName field is no longer mapped.

Profile Import Blank

That is all of the changes required to make the display name editable by the user.

What The User Sees and Can Edit

When the user navigates to a SharePoint site the initial view will show the information contained in AD (I assume this is the same for other providers but you will need to test) including the display name.

AD User Info

AD user with defined Display Name, this will be used initially when the user accesses a SharePoint site as shown below.

Not Active on Team Site

To edit the display name navigate to your My Site, this will initially look like the image below, notice that the Welcome message is not based on the display name from AD but the users account name. In this example I have blurred the domain name.

Default My Site

Click on the Details option under the My Profile Quick Launch and edit the Name field.

New name

In order to test this I have used a time stamp so I could repeat the tests and identify what had changed.

Clicking on Save will take you back to the My Site home page and will show some of the fields have updated but others have not. The fields that have not updated are based on the User Info table and is updated by the Quick Profile Synchronization timer job (see below).

Initial changes in My Site

The Quick Profile Synchronization timer job is scheduled too run regularly (minutes) but I have found in testing, and this will increase as your number of users and sites increase, it can take a while for the changes to take place. You can force this timer job by running the STSADM operation SYNC.

stsadm -o sync

stsadm -o sync

Note: this starts the job, the changes will not appear instantly.

After the sync has been performed the User Info table will be updated with the values from the My Profile details.

New name takes effect

Why do some Team Sites not update with my details

The main reason for confusion around the updating (sync’ing) of My Profile details into team sites is that it is now based on if the user is Active. As part of the upgrade to V3 Microsoft introduced the idea of users being active in a site rather than just having access.

When you first visit a site a record is recorded in the UserInfo table of the sites Content Database. The field tp_IsActive is defaulted to false, which means you have visited but have not interacted with the site.

The Sync process uses this value to determine if the user info should be replicated from the My Profile details as edited above.

Following on from the example above you should be able to refresh your team site that you had only visited and see the user name is still the same, it was not updated when the My Site was updated.

Not Active on Team Site

If you now interact with the site, either add a document or edit a link, in effect become an active user of the site, and then run the stsadm -o sync command as above the My Profile changes to the user name will be replicated to the site.

Test Site Updated

Sync Timer Jobs and STSADM

The synchronisation of the profile properties and information are based on two timer jobs, and one stsadm command (as used above). These jobs are per web application so you may see multiple of these configured in your environment. Access to these is via Centra Admin -> Operations.

Profile Timer Jobs

These timer jobs are part of the Microsoft.Office.Server.UserProfiles namespace and specifically
WSSProfileSynch
Handles the synchronization of user profile data in the Windows SharePoint Services user information list on each site, and the synchronization of Windows SharePoint Services members group membership in the user profile memberships. This class is not intended to be used directly from your code; use stsadm.exe instead.
WSSSweepSynch
Handles the incremental synchronization of user profile data in the Windows SharePoint Services user information list on each site. This class is not intended to be used directly from your code; use stsadm.exe instead.

I have yet to determine exactly which of these processes are triggered using the stsadm -o sync command.

Additional Information

Profile Synchronisation on MSDN

Sahil Malik has a good post on the high level information flow within MOSS here.

I have also included below some sample code that I used to try and speed up the timer jobs. You may want to use these to help understand what each timer job does. Note, changing the Profile Synchronization schedule will not remain, another time job appears to reset this to the installed defaults.

static void Main(string[] args){ List<System.Uri> urls = new List<System.Uri>(); urls.Add(new System.Uri(“http://mysite_webapplication”)); urls.Add(new System.Uri(“http://portal_webapplication”)); for (int i = 0; i < urls.Count; i++) { SPWebApplication webApp = SPWebApplication.Lookup(urls[i]); foreach (SPJobDefinition job in webApp.JobDefinitions) { // “profsynch” = Profile Syncronisation // “sweepsync” = Quick Profile Syncronisation if (job.Name == “profsynch”) { SPMinuteSchedule schedule = new SPMinuteSchedule(); schedule.BeginSecond = 0; schedule.EndSecond = 59; schedule.Interval = 1; job.Schedule = schedule; job.Update(); Console.WriteLine(“Temporarily Updated Profile Sync for Web Application {0}”, webApp.Name); } } } Console.ReadLine();}

Error and Omissions

Warning: Access to the database directly is not supported, I performed this in my test environment to understand why things worked the way they did.

Using a famous Todd Bleeker line from TechEd Orlando – I reserve the right to be wrong! This is what I have found so far, but my knowledge and understanding of this may change over time.

This entry was posted in SharePoint and tagged , . Bookmark the permalink.
  • Anonymous

    So it seems that in situations where users are only Readers at the root site but have Contributor or greater access further down, they will never be considered active at the root. Their UserInfo can end up being different there than in their active sites where the Profile sync updates it regularly. Is there a way to flag a user as active without raising their permissions or resorting to database manipulation?

  • Andrew Woodward

    There is no way that I have found to update the Active status of the user without ‘making them active’ or as you say using an unsupported database update.

  • Anonymous

    Hi Andrew. Firstly I’d like to thank you, great Post.

    We are having a situation where a user got married (Changed surname) so account changed
    from “domain\oldlastnameA”
    to “domain\newlastnameA”

    This user now logs on succesfully but the prefered name in the User Information List is still “lastname, oldlastname”. Why has the prefered name not been updated? Is there a bug or something I can check?

    Thanks again

  • Andrew Woodward

    You need to use the command

    stsadm -o migrateuser

    -oldlogin [domain\name]

    -newlogin [domain\name]

    [-ignoresidhistory]

    See technet article for more info.

  • Anon Friend

    I have the same problem as described above, however the domain name remained the same (we use a combination of letters and numbers) only the email address has been changed. The user information list shows the new email address, but the SIP address has not updated. When we add the user to a new site they weren’t a member of, the correct, new information is shown, it only seems to be sites they were already a member of. We’ve tried removing them from th esite and adding them back in, but that doesn’t work…. Does the above command still apply? How would we use it?

  • Anonymous

    Great Post!

    The problem I am having is that the information in active directory is not current and when an user changes his/her information under my site settings like telpehoneNumber the information is been updated in active directory. We got configure the Profile Import to run x time on the morning but the information is not been updated. Should I need to run the stsadm synch tool?

    Once again thanks for this great post.

  • http://www.21apps.com Andrew Woodward

    Sync is one way it takes information from AD and populates SharePoint, you really need to look at a solution for getting the AD information correct or reducing the information you sync where it is know to be incorrect in AD.

  • anonymous

    great post. Since you’ve looked at ssp and profile properties more than most, I’m hoping you’ll entertain my question.

    I’m having trouble getting my ssp profile to reflect at the site level for seemingly active users. These are profile settings which should be replicating according to the ssp. It did work perfectly well for a day, which upsets me farther.

    I did find a 3rd party sync tool on codeplex, which isn’t the most efficient, but it does get the job done–however it only works on old profiles, created before the ‘break’. Have you ever heard of any of this? it’s madness. both my ssp’s have the same issue, and there is no connectivity problem updating the ssp from the applications below it. No errors anywhere I’ve seen, sync jobs say they’re working fine.

  • nuts

    Awesome detail !!!

    Well Andrew I am facing an issue where USERINFO table of my particular (Individual) web application has own detail about “SHAREPOINT\SYSTEM” where Display name should be System Account.
    But in my case for some of the web application it showing different name and for some its coming with System Account.

    As this is SharePoint\System account it dosent required to get updated from the UserProfile_Full table of SSP . That is what I understood ( correct me if i am wrong)

    When i checked the USERINFO table of particular web application is showing me the diffrent name so question is does it make sense to change manually in that table of database ? if not than is there any way i can get rid of this problem.

    Let me know if you need more information and Thanks in advance.

  • http://code.grep.in bekz

    Hi Andrew,

    Do you know how the Sync by Full/incremental timer identify the user info enty in WSS web application. i.e. SSP has the details stored in SSP DBs now what is the key in mapping the user profile in SSP to WSS web app?

    Really cool article and appreciate your efforts!

    Regrads
    bekz

  • http://anthonysheldrake.com Anthony Sheldrake

    Thanks for taking the time to write this one up. The concept of an active user was a new one on me so it’d have taken me a long time to get to the bottom of this problem without your post.

  • Billoo

    Hi Andrew,
    I am facing a similar problem. The user's title was changed and it is displaying the new title in his mysite, but in “People and Groups “, his old details are displayed.
    Action Performed
    stsadm -o sync
    Profile Import Full and incremental
    Any inputs would help :)

  • Lars Bo

    Great post Andrew,

    It sums up all relevant information regarding profile synchronisation I have seen. However, having read this and countless other blogs we were still having problems. It turned out that an “STSADM -o preparetomove” command that no one remembered issuing two years back had flagged our portal for no synchronisation. This will rarely be the case, but in case anyone finds themselves in a similar situation here is a good post on the subject:

    http://blogs.gotdotnet.com/toddca/archive/2009/…

    The solution was running STSADM -o preparetomove with the -undo parameter (note that this is only valid for pre SP1 systems).

  • http://www.21apps.com AndrewWoody

    Thanks Lars, this is definately a new one on me.

  • http://sharepoint.microsoft.com/blogs/fromthefield Neil Hodgkinson

    Lars. Just wanted to comment on your comment.

    The Preparetomove operation was deprecated as part of the changes in the Infrastructure Updates, not SP1. It does catch a lot of people out though so thanks for adding it to this excellent post.

  • Adil Baig

    Hi,
    I think my profile sync has overwritten the profiles but not sure. ne ways, bottom line is user had 'about me' field in the edit page but now they dont after i run a profile import.
    I did what the post says.. i unchecked the replicable, also i checked user can override. and set the data source to “not mapped”. but on saving the settings for property. i come back on the user info list and my edit page still dont hjave that property.
    important note: my site is enabled but my users are not using it. they are new and still comfortable with the edit page. but now the problem is.. half the perprty they had previously are not there any more.
    MOSS profile is surely complicated nad frustating!!

  • Pingback: My SharePoint of View » Blog Archive » Great post on sync of usernames

  • Pingback: Re-thinking the SharePoint Memberships feature – part 1 « YASB by Nordtorp

  • PlateSpinner

    For what it's worth, it appears that the “stsadm -o sync” command will just force the “Quick Profile Synchronization” job. The regular “Profile Synchronization” job will just wait for the next time on the schedule.

  • Steve Wigren

    If you take a content database offline it also will not sync with the SSP profiles. You’ll see this message for each off-line database in the SharePoint logs if you run stsadm -o sync:

    Aborting sweepsynch for guid instance …. due to null or non-online content database

    We had made the content db’s offline so that no more site collections could be created in them, but it looks like you can’t do that if you want user info to be updated.

  • samcvnath

    Can you let me know if it is possible to populate a sharePoint list using this webservice. the requirement is that user’s profile info to be fetched for member directory in different community portals within our organization. need to display this for each portal with search/taggging feature activated.

    the User information list, where i create a custom view allows me to display selected replicable information from profile properties but not able to filter or search using custom query strings passed as this webpart on the page does not allow conections. this also does not allow all visitors to see the member list as only the added members to that group can view it.

    awaiting your response eagerly,

    Swami

  • http://www.21apps.com AndrewWoody

    Steve, I agree that the 'Off-Line' database option is one of the worst thought out/UI bits of SharePoint. My recommendation has always been to just set the maximum number of site collections to 1 when you want to stop new ones being added.

  • hawaiijobs555

    Great Post.
    For more jobs visit http://www.staffingpower.com

  • achmad

    Hi, Thanks fr the great post, we have a problem, we'd like the user is automatically mapped to each corresponding department such as in AD we have Quality Assurance OU and in sharepoint we have Quality Assurance team site and Deployment Team Site.

  • http://www.21apps.com AndrewWoody

    Achmad, are you looking to automatically link your AD OU to a Team Site membership? I don't think this is possible however you could easily create an AD group that you then add to a SharePoint group in your team sites to provide the permissions needed.

  • Pingback: Matthew McDermott

  • Lee Diggins

    This post is excellent and got me moving in the right direction. So I thought I'd come back and post here.

    The solution I have found for pushing updates for all profiles to all sites for both active and inactive flagged users is:

    stsadm -o sync -ignoreisactive 1

    You must have MOSS version 12.0.6314.5000 or higher.

  • http://www.21apps.com AndrewWoody

    Thanks lee – this is a great find and obviously something Microsoft
    had to address.

    Andrew

  • Matt

    I had this problem and it seemed nothing would fix it. I called Microsoft, mentioned all the deleteolddatabases, synctiming, ignoreisactive, etc etc etc that I ran. Here's our 2 second fix.

    Add the user explicitly into a different site in the site collection again or add them back into the site again. Verify their settings update (which in our case it did) and then remove the explicit add. Since we were using groups and not explicit users to control permissions, it appears the WSS profile wouldn't update. The manual explicit add forced a recheck it seems.

    That was it! Still doesn't explain the bug, but it got us there!

  • Vikram

    Awesome….

  • Altf21

    The information is usefull, but still the WSS sites and Shared services are not getting synchronized even after running this command

    stsadm -o sync ignoreisactive 1

    also did the iisreset /noforce still no effect.

    Please share any other workaround.

    Thanks

  • http://www.best-website-designer.com Sarah Jones

    That is the way we need to explain solution for a problem. Great post.

    Best Website Design l Best Web Design l Best Website Designing

  • http://sanantonioalarmsystemstx.com Alarms San Antonio TX

    I think that trying several more times maybe helpful to make your updated profiles showed.