MarkLogic 10 Product Documentation
xdmp:ldap-lookup

xdmp:ldap-lookup(
   $DN as xs:string,
   [$options as (element()|map:map)?]
) as element()*

Summary

Returns an ldap entry.

Parameters
DN The DN of the entry to be returned.
options Options with which to customize this operation. You can specify options as either an XML element in the "xdmp:ldap" namespace, or as a map:map. The options names below are XML element localnames. When using a map, replace the hyphens with camel casing. For example, "an-option" becomes "anOption" when used as a map:map key. This function supports the following options:
username
ldap username.
password
ldap password.
server-uri
ldap server uri.
use-appserver-config
Use appserver config as default. Specify true or false. The default is false.
bind-method
ldap bind method. Specify simple, MD5 or external. The default is MD5.
credential-id
The credential to be used to sign the generated certificate.
"start-tls"
start tls (Transport Layer Security) extended operation. Specify true or false. The default is false.
"certificate"
client certificate.
"private-key"
private key for the client certificate.
"nested-lookup"
Enable nested group lookup. Specify true or false. The default is true.

Example

xdmp:ldap-lookup(
  "CN=Jane Doe,CN=Users,DC=MLTEST1,DC=LOCAL",
   <options xmlns="xdmp:ldap">
  <username>admin</username>
  <password>admin</password>
  <server-uri>ldap://dc1.mltest1.local:389</server-uri>
 </options>)

=>
<ldap-object xmlns="http://marklogic.com/xdmp/ldap/object">
<ldap-attribute id="DN">CN=Jane Doe,CN=Users,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="objectClass">top</ldap-attribute>
<ldap-attribute id="objectClass">person</ldap-attribute>
<ldap-attribute id="objectClass">organizationalPerson</ldap-attribute>
<ldap-attribute id="objectClass">user</ldap-attribute>
<ldap-attribute id="cn">Jane Doe</ldap-attribute>
<ldap-attribute id="sn">Tsoi</ldap-attribute>
<ldap-attribute id="givenName">Jane</ldap-attribute>
<ldap-attribute id="distinguishedName">CN=Jane Doe,CN=Users,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="instanceType">4</ldap-attribute>
<ldap-attribute id="whenCreated">20120418134913.0Z</ldap-attribute>
<ldap-attribute id="whenChanged">20130423001215.0Z</ldap-attribute>
<ldap-attribute id="displayName">Jane Doe</ldap-attribute>
<ldap-attribute id="uSNCreated">21173</ldap-attribute>
<ldap-attribute id="memberOf">CN=TestGroup Admin,CN=Users,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="memberOf">CN=Domain Admins,CN=Users,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="memberOf">CN=Remote Desktop Users,CN=Builtin,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="uSNChanged">82727</ldap-attribute>
<ldap-attribute id="name">Jane Doe</ldap-attribute>
<ldap-attribute id="userAccountControl">66048</ldap-attribute>
<ldap-attribute id="badPwdCount">0</ldap-attribute>
<ldap-attribute id="codePage">0</ldap-attribute>
<ldap-attribute id="countryCode">0</ldap-attribute>
<ldap-attribute id="badPasswordTime">130112986222890625</ldap-attribute>
<ldap-attribute id="lastLogoff">0</ldap-attribute>
<ldap-attribute id="lastLogon">130117512192890625</ldap-attribute>
<ldap-attribute id="pwdLastSet">129792305530986328</ldap-attribute>
<ldap-attribute id="primaryGroupID">513</ldap-attribute>
<ldap-attribute id="adminCount">1</ldap-attribute>
<ldap-attribute id="accountExpires">9223372036854775807</ldap-attribute>
<ldap-attribute id="logonCount">205</ldap-attribute>
<ldap-attribute id="sAMAccountName">jdoe</ldap-attribute>
<ldap-attribute id="sAMAccountType">805306368</ldap-attribute>
<ldap-attribute id="userPrincipalName">jdoe@MLTEST1.LOCAL</ldap-attribute>
<ldap-attribute id="objectCategory">CN=Person,CN=Schema,CN=Configuration,DC=MLTEST1,DC=LOCAL</ldap-attribute>
<ldap-attribute id="dSCorePropagationData">20120530014553.0Z</ldap-attribute>
<ldap-attribute id="dSCorePropagationData">16010101000000.0Z</ldap-attribute>
<ldap-attribute id="lastLogonTimestamp">130111495353203125</ldap-attribute>
</ldap-object>
Powered by MarkLogic Server | Terms of Use | Privacy Policy