Try our conversational search powered by Generative AI!

Getting info from AD


I'm working on a site where users authenticate via Active Directory. I can retrieve the users fullname via CurrentUser.Fullname or username via CurrentUser.UserName. That's pretty much it... I would like to retrieve the users e-mailadress as well... and maybe some other info. How can I go about getting this information out of the AD? The site is using CMS 6 R2. What would be the easiest way?

Aug 07, 2013 10:09


The easiest way is to use the methods in System.DirectoryServices, please see And then fetch the user as an UserPrincipal, which will have all the properties. If you extend the UserPrincipal object you can get custom properties typed.

Aug 07, 2013 16:24

I agree with Johan above. Using .NET standard System.DirectoryServices to retrieve additional information about the user is the way to go. Expensive operation so might want to store it in either session or by extending the current user yes...

Aug 07, 2013 17:27

Thank you... Shall have a look at it!

Aug 09, 2013 10:19
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.