Created
March 10, 2017 01:36
-
-
Save adamdriscoll/5784d7a9a48940c238751832fd2feb6e to your computer and use it in GitHub Desktop.
Delete attribute LDAP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connectionObject = new LdapConnection(new LdapDirectoryIdentifier(controller), new NetworkCredential(username, password)); | |
var directoryAttributeModification = new DirectoryAttributeModification(); | |
directoryAttributeModification.Name = attribute; | |
directoryAttributeModification.Operation = DirectoryAttributeOperation.Delete; | |
var response = connectionObject.SendRequest(new ModifyRequest | |
{ | |
DistinguishedName = dn, | |
Modifications = | |
{ | |
directoryAttributeModification | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment