hoping someone can assist with my current problem. I've been Googling for a solution for the past few days but haven't found anything yet that is close to what I need.

My scenario

The HR Department has requested for an application to track staff hire/termination transfer. To cater for this a new custom list is created to hold the applicable data. One of the fields in this list will store the login id of the user for an external application. The value of the login id is stored in AD and synced to the User Profile. This synchronization is working well. All this is on a SharePoint 2010 server.

My question is, what is the best way to retrieve the value from the user profile and update the custom list with the login id?

My idea is to do a query to the User Profile based on the user employee id and update accordingly. Can this be done? If it's possible can someone guide me on how to do it? I'm sure there's a straightforward solution to this but being a SharePoint noob I can't get my head around it.

2 Answers 2


You need to get a UserProfileManager (Sample at link) then either call GetUserProfile and retrieve properties from that or call GetStringSinglePropertyValueForUser if you only need a single property


You could also write a timer job that periodically looked at the User Profile Change Log and determined if specific values that you are watching changed. It is more performant in most cases.

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.