Suppose you are connected to Active Directory using simple syntax:
string adPath = "LDAP://server.domain.com/CN=John,CN=Users,dc=domain,dc=com"; DirectoryEntry userEntry = Settings.GetADEntry(adPath);
Now you will find that you would like to see the attribute for this user. Let's try to display a mail attribute (denoting an email address):
Console.WriteLine("User mail attribute is " + userEntry.Properties["mail"]);
How can I remove the value of the mail attribute since setting it to an empty string will not cause an error?
c # active-directory
Dscoduc
source share