What I mean is that right now I am using System.DirectoryServices.AccountManagement and if I use UserPrincipal class I only see the Name, Middle Name, etc
so in my c
In this case, you need to go one level deeper - back into the bowels of DirectoryEntry
- by grabbing it from the user principal:
using (DirectoryEntry de = myUser.GetUnderlyingObject() as DirectoryEntry)
{
if (de != null)
{
// Go for those attributes and do what you need to do...
var mobile = de.Properties["mobile"].Value as string;
var info = de.Properties["info"].Value as string;
}
}