This project has moved and is read-only. For the latest updates, please go here.

Get Users By Department

Apr 19, 2013 at 7:15 PM
Edited Apr 19, 2013 at 8:03 PM
I'm creating an out-of-office calenar so that people can see who is on vactaion, business travel, out-sick, etc. I have a list with field employee (type Person) and Start Date.
I have a requirement to let executives pick a department and then see who in that departemnt is out each day.

Can the UserProfileService be used to get a list of all the employees in a department? Can it get me a list of all departments in the USer Profile Store?

Thers's another potential issue I have, not all users have access to sharepoint, so I'm not sure if the user profile servic even has info on those people.

I'm on SP2010 Enterprise.
Apr 20, 2013 at 5:13 PM

Unfortunately there's no Web Service operation to query the User Profile Store directly. However, search shoould do what you want. Just call the Query operation with the appropriate keywords and settings and you'll get back the list of people.