Hi,
We've been using the User Profile Change Log to keep track of user's changes in their profile.
I've included the code snippet I use in C# below.
My problem is that changes where I remove values to SingleValueProperties do not seem to appear here.
For example, if I have WorkPhone property that was initially set to a phone number. Then I remove that phone number and save it, this change is actually not captured in the Event Log.
I verified this by going to the SP User Profile Database and checking the UserProfileEventLogValue and verifying upon changes that those I set to empty values do not get logged here, but it does when I set non-empty values.
Can someone help me be able to keep track of changes including ones that are set to Empty?
Thanks!
CODE:
UserProfileChangeQuery changeQuery = new UserProfileChangeQuery(true, true); UserProfileChangeToken changeToken = new UserProfileChangeToken(startDate); changeQuery.ChangeTokenStart = changeToken; changeQuery.Anniversary = false; changeQuery.SingleValueProperty = true; changeQuery.MultiValueProperty = true; changeQuery.DistributionListMembership = false; changeQuery.SiteMembership = false; UserProfileChangeCollection changes = userProfile.GetChanges(changeQuery);