jump to navigation

Get mail and manager from user profile December 4, 2015

Posted by juanpablo1manrique in SharePoint.
Tags:
trackback

ServerContext serverContext = ServerContext.GetContext(web.Site);
UserProfileManager myUserProfile = new UserProfileManager(serverContext);
UserProfile currentUserProfile = myUserProfile.GetUserProfile(userName);

string managerUserName = (string)currentUserProfile[“manager”].Value;

string workerEmail = (string)currentUserProfile[“WorkEmail”].Value;

Comments»

No comments yet — be the first.

Leave a comment