Click or drag to resize
Galactic API

LDAPGetEntryByDistinguishedName Method

Gets an entry from the directory with the specified distinguished name.

Namespace:  Galactic.LDAP
Assembly:  Galactic.LDAP (in Galactic.LDAP.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax
public SearchResultEntry GetEntryByDistinguishedName(
	string dn,
	List<string> attributes = null,
	string baseDn = null,
	SearchScope scope = SearchScope.Subtree
)

Parameters

dn
Type: SystemString
The distinguished name of the entry to retrieve.
attributes (Optional)
Type: System.Collections.GenericListString
(Optional) The attributes that should be returned in each entry found. If not provided, all attributes are returned.
baseDn (Optional)
Type: SystemString
(Optional)The distinguished name of the base entry where the search will begin. (Typically an OU or the base DN of the directory.) If not supplied, the default values will be used. This base is used only for the duration of this search.
scope (Optional)
Type: System.DirectoryServices.ProtocolsSearchScope
(Optional) The scope to use while searching. Defaults to Subtree. (Typically Base, just the object with the DN specified; OneLevel, just the child objects of the base object; or Subtree, the base object and all child objects) This scope is used only for the duration of this search.

Return Value

Type: SearchResultEntry
The entry with the specified distinguished name or null if the entry does not exist or there was an error in its retrieval.
See Also