Sharepoint 2010, get the Distinct Values of a User Profile Property?
Posted
by Michael Stum
on Stack Overflow
See other posts from Stack Overflow
or by Michael Stum
Published on 2010-06-07T19:28:31Z
Indexed on
2010/06/07
19:32 UTC
Read the original article
Hit count: 271
.NET
|sharepoint2010
Is there any way in SharePoint 2010 to get the Distinct values of a property accross all users? For example, I want a list of all Departments in the Profile Store.
In SQL I can do
SELECT DISTINCT(PropertyVal) FROM [ProfileDB].[dbo].[UserProfileValue]
WHERE PropertyID = 14
but accessing the SQL Database is a big no-no of course, so I wonder if there is something in the object model?
Note that accessing the User Information List on an SPSite is not good enough, as only a fraction of all users is in that list. I want to get it directly from the Profile Store.
© Stack Overflow or respective owner