How can I find the list of colleagues/Team-members for a SharePoint 2010 user? and how can i find the scope for a specific user profile property (eg..birthday--->Everyone, Interest--->My Team)which user has set on his Mysite?
1 Answer
The UserProfile class has a Colleagues property that contains a ColleagueManager.
MSDN has some examples on how to work with the new User Profile classes and UserProfileManager here.
-
$UserCM = $usrprofile.Colleagues; ($UserCM.GetItems() | where {$_.Group -eq "Peers" } ) $usrprofile["HomePhone"].Privacy Commented May 6, 2011 at 15:08