| 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
)
Public Function GetEntryByDistinguishedName (
dn As String,
Optional attributes As List(Of String) = Nothing,
Optional baseDn As String = Nothing,
Optional scope As SearchScope = SearchScope.Subtree
) As SearchResultEntry
public:
SearchResultEntry^ GetEntryByDistinguishedName(
String^ dn,
List<String^>^ attributes = nullptr,
String^ baseDn = nullptr,
SearchScope scope = SearchScope::Subtree
)
member GetEntryByDistinguishedName :
dn : string *
?attributes : List<string> *
?baseDn : string *
?scope : SearchScope
(* Defaults:
let _attributes = defaultArg attributes null
let _baseDn = defaultArg baseDn null
let _scope = defaultArg scope SearchScope.Subtree
*)
-> SearchResultEntry
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:
SearchResultEntryThe entry with the specified distinguished name or null if the entry does not exist or there was an error in its retrieval.
See Also