Loading TOC...

MarkLogic 9 Product Documentation
xdmp.ldapLookup

xdmp.ldapLookup(
   DN as String,
   [options as Object?]
) as Sequence

Summary

Returns an ldap entry.

Parameters
DN The DN of the entry to be returned.
options Options with which to customize this operation. This function supports the following options:
username
ldap username.
password
ldap password.
serverUri
ldap server uri.
useAppserverConfig
Use appserver config as default. Specify true or false. The default is false.
bindMethod
ldap bind method. Specify simple, MD5 or external. The default is MD5.
credentialId
The credential to be used to sign the generated certificate.
"startTls"
start tls (Transport Layer Security) extended operation. Specify true or false. The default is false.
"certificate"
client certificate.
"privateKey"
private key for the client certificate.
"nestedLookup"
Enable nested group lookup. Specify true or false. The default is true.

Example

xdmp.ldapLookup(
  "CN=Jane Doe,CN=Users,DC=MLTEST1,DC=LOCAL",
  {"username":"admin",
   "password":"admin",
   "serverUri":"ldap://dc1.mltest1.local:389"});

=> (Sequence of ldap attributes)
{"DN":"CN=TestUser 1,CN=Users,DC=MLTEST1,DC=LOCAL"}
{"objectClass":"top"}
{"objectClass":"person"}
{"objectClass":"organizationalPerson"}
{"objectClass":"user"}
{"cn":"TestUser 1"}
{"sn":"1"}
{"givenName":"TestUser"}
{"distinguishedName":"CN=TestUser 1,CN=Users,DC=MLTEST1,DC=LOCAL"}
{"instanceType":"4"}
{"whenCreated":"20120403202513.0Z"}
{"whenChanged":"20141110215113.0Z"}
{"displayName":"TestUser 1"}
{"uSNCreated":"16424"}
{"memberOf":"CN=TestGroup Admin,CN=Users,DC=MLTEST1,DC=LOCAL"}
{"memberOf":"CN=Domain Admins,CN=Users,DC=MLTEST1,DC=LOCAL"}
{"memberOf":"CN=Enterprise Admins,CN=Users,DC=MLTEST1,DC=LOCAL"}
{"uSNChanged":"821482"}
{"name":"TestUser 1"}
{"userAccountControl":"66048"}
{"badPwdCount":"0"}
{"codePage":"0"}
{"countryCode":"0"}
{"badPasswordTime":"130603927417675781"}
{"lastLogoff":"0"}
{"lastLogon":"130604939565429688"}
{"pwdLastSet":"129779583138125000"}
{"primaryGroupID":"513"}
{"adminCount":"1"}
{"accountExpires":"9223372036854775807"}
{"logonCount":"384"}
{"sAMAccountName":"test1"}
{"sAMAccountType":"805306368"}
{"userPrincipalName":"test1@MLTEST1.LOCAL"}
{"objectCategory":"CN=Person,CN=Schema,CN=Configuration,DC=MLTEST1,DC=LOCAL"}
{"dSCorePropagationData":"20120403203538.0Z"}
{"dSCorePropagationData":"16010101000000.0Z"}
{"lastLogonTimestamp":"130601298735058594"}

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.