Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In a web part (either out of the box or custom), I would like to list the user profiles most recently imported from Active Directory. This would be roughly equivalent to the most recent hires. Is this possible, and if so, what is the best approach?

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

Considering the fact that there could be lots of users in Active Directory, I reckon that the best approach here will be to use SharePoint search, sort by Hire date descending, and select only top N users. Then, you can display results, for example using DataViewWebPart.

It is not an easy way to achieve the goal, but it is preferrable. Here are some links which can help you with this:

Easier solution could be implemented, if you're sure that the number of users in your Active Directory will always remain small (less than 200 users, for example). In this case you can simply create a custom webpart, grab all the User Profiles using UserProfileManager class, and sort them by the "Hire date" property with help of Linq-to-object. Finally, you can display this information using ASP.Net Repeater or DataView controls.

In either case, you have to configure the "Hire date" User Profile property and map it to the "createTimeStamp" Active Directory attribute.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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