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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: