How to get Employeers-ID atribute from active directory on webpart

Posted by Serafi on Stack Overflow See other posts from Stack Overflow or by Serafi
Published on 2010-03-12T16:13:55Z Indexed on 2010/03/12 16:17 UTC
Read the original article Hit count: 587

Filed under:
|
|

Hello all,

I have managed to get info about the currently logged in user on my webpart by using this short code;

WindowsPrincipal p = Thread.CurrentPrincipal as WindowsPrincipal; string strLoggedInUser = p.Identity.Name;

What I would need now, is to get info of Employeer-ID atribute from the active directory, wich I have added by following this quide over here; http://www.tech-archive.net/Archive/Windows/microsoft.public.windows.server.active_directory/2005-08/msg01766.html

I have found serval of quides about how to use active directory on the webpart, but they all were very complex for me to understand. And I only wish to get info about this single attribute "Employeers-ID". Can anyone help me with this?

Thanks in advance!

© Stack Overflow or respective owner

Related posts about webpart

Related posts about webparts