Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a company intranet where users are automatically logged in using integrated windows authentication.

Is there any way for a web part to grab some of their account information such as full name, email and dept?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Based on you having a correct synchronization between AD and SharePoint User Profile Service, you can use the UserProfileManager from the webpart's code behind to grab the users profile and retrieve data: http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles.userprofilemanager.aspx

There is a basic example at the link of how to work it, and you can find more on the web.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.