Due to the project requirement, we want to trace the user profile property changes (made through mysite) whenever they do.

Is it a good idea to insert a javascript (through a delegation control) and capture the page "beforeUnload" event. The "beforeUnload" function will call a "generic handler" with a current user login id and in which we can actually trace the profile changes using the class "UserProfileChangeQuery".

or is there an event to override like itemupdating?

or what would be the simplest method?

also does the class "UserProfileChangeQuery" return a updated information or the old data?

2 Answers 2


Gary Lapointe and Mathew McDermott recently published an article on this topic in SharePointPro magazine. It is available online here:


Synopsis of the article:

First you enable logging via the STSADM tool (no PS available for this)

stsadm -o profilechangelog -userprofileapplication "My User Profile Service App" -daysofhistory 28

You gain access to the objects in Microsoft.Office.Server.UserProfiles namespace (which you are already aware of).

The UserProfileManager class contains the GetChanges method.

This method has three overloads:

  • GetChanges(), which retrieves all changes
  • GetChanges(UserProfileChangeToken), which retrieves all changes from a given date or event
  • GetChanges(ProfileBaseChangeQuery), which retrieves specific changes given a query object

All the GetChanges overloads return a UserProfileChangeCollection object. This object contains all the changes stored as either a UserProfileChange object or one of its derivative types:

  • UserProfileColleagueChange
  • UserProfileCustomChange
  • UserProfileLinkItemChange
  • UserProfileMembershipChange
  • UserProfileOrganizationMembershipChange
  • UserProfilePropertyValueChange
  • UserProfileWebLogChange
  • a very good answer! Good find! Sep 24, 2011 at 9:56
  • Thank you for your answer, my intention is to trace the profile changes before the page is getting redirected to the "person.aspx". I have to update a certain user profile property if user has updated a certain list of properties before the "editprofile.aspx" page is getting redirected. is there a way to achieve it? Sep 25, 2011 at 15:48
  • once again, thank you for the answer...the below url can also give you additional info in regards to this..directsharepoint.com/2011/05/monitor-user-profile-changes.html Sep 27, 2011 at 8:30

Sharepoint 2010 has the ability to log just about everything ranging from your dog barking to the server has crashed.

Not all of it as activated by default though.

Have a look at Monitoring > Configure diagnostic logging in your Central Admin.

Under SharePoint Portal Server there are a couple which you need to tick:

SPS People User Profiles Personal Sites

At the bottom of the page, you can specify where you want to log everything: Sharepoint Trace Log, or Windows App Logs. Id go for Trace Logs.

Take note of the other settings which will WIPE the old logs at a certain stage.

Next, up, you'd have to get something like ULSViewer to monitor it.

Hope this help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.