Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Show DisplayName from AD through

Hi, Does anyone knows how to show the "DisplayName" from Active Directory in a EPiServer template. This only returns the login name (eg. MyDomain\StJa) string name = user.Identity.Name; But I would like to get the complete name which is stored in AD, in my case, "Stefan Jakobsson" Is this possible via the EPiServer API or do I need to write my own script for this? Thanks! //Stefan
Mar 01, 2005 9:59
You need to write this code yourself. See the System.DirectoryServices namespace and the DirectoryEntry class for more information. /Steve
Mar 01, 2005 18:13
Is it possible to import the information into EPiServer Users fra AD other than just the username? /per
Mar 02, 2005 10:32
You could do a scheduled job that loops through the EPiServer user collection, finds the user in AD, and updates the EPiServer user with that information. You have to decide which fields to update, what to do with users that already have defined values (overwrite, keep, etc.) There are customers that have this in place already, so it is absolutely doable, you just need to know your way around AD and ADSI. /Steve
Mar 02, 2005 16:38
Just found a relevant example on how do this on wwwcoder. See There are other articles on wwwcoder about AD that are interesting too: (lots of examples.) Seems like most examples are, but they should be easy to convert. You can also do a search for "active directory" on for lots of good articles. /Steve
Mar 06, 2005 14:52
* 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.