User Profiles and User Information List Synchronization

 

    Lately I have been getting a lot of questions about where user data is stored and how it is synchronized within SharePoint 2007. This inspired me to write this blog post about User Profiles and the User Information List or UserInfo table. I will also do a future post on what happens when a user profile is deleted from MOSS 2007.

     

    User Profiles

    The user profile store in MOSS 2007 contains information about users. User profiles can be created by importing users from a user account directory, or they can be created manually. In most environments Active Directory will be used as the source for creating user profiles. In the MOSS 2007 Shared Service Provider an LDAP import query can be configured that will create user profiles for accounts that are returned from Active Directory by the LDAP query. The user profile imports can be scheduled to  run on a regular basis and they can be either  incremental or full.

    Once a user profile is created additional information about the user can be added to the user profile properties by the user itself, an administrator, a Business Data Catalog data source or an LDAP directory.

    By default data from user profiles is shown in the People Search results, on the My Site and in the User Information list of MOSS and WSS sites.

     

    User Information List

    All MOSS 2007 and WSS 3.0 sites have a user information list. The information in the user information list is stored in the UserInfo table in the content database of the site. A user gets added to the user information list  when he or she has accesses the site for the first time. In the user information list a user's email address, login name and name are stored. MOSS will make sure that user profile property information for those fields for users that are added to the user information list is sent to the user

    information list.  The image below shows an overview of the user profile architecture in MOSS 2007.

     

     User Profile Architecture

     

    Synchronizing user profile data to the user information list

    Keeping the information in the user information lists up to data is a task that is handled by the Profile Synchronization and the Quick Profile Synchronization timer jobs. By default the first job runs once every hour, the second one runs every couple of minutes and is incremental. The first time user data is replicated from the user profile to the user information list of a site a full update is needed. So the Profile Synchronization job needs to run in order to get the data replicated to the site and this may take up to an hour. If information about a user is already stored in the user information list and the information changes in the user profile it will be synchronized with the data in the site collection by the  Quick Profile Synchronization job.

     

    Profile Sync Jobs

     

    You can also kick off the profile synchronization jobs by running the stsadm sync command.

     

     stsadm -o sync

     

    If you believe that information is not synced between the user profiles and the user information lists in one or more sites you can request a list of content databases that have not been synchronized for x number of days by using the following stsadm sync command.

     

    stsadm -o sync -listolddatabases <x number of days>

     

    If one or more content databases show up in this list you can clean up the sync list so they can be added to the list again.

     

    stsadm -o sync -deleteolddatabases <x number of days>

     

    You can also use the sync command to change the schedule for the synchronization job.

    For more information on the stsadm sync command have a look here http://technet.microsoft.com/en-us/library/cc263196.aspx.