MarkLogic 12 EA 1 Product Documentation
xdmp:ldap-search

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

Summary

Returns ldap search result.

Parameters
query The query is a string representation of the filter to apply in the search. The string should conform to the format specified in RFC 4515 as extended by RFC 4526. For example, "(cn=Jane Doe)".
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.
search-base
search-base is the DN of the entry at which to start the search.
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.

Example

xdmp:ldap-search(
  "(cn=Jane Doe)",
   <options xmlns="xdmp:ldap">
  <username>admin</username>
  <password>admin</password>
  <server-uri>ldap://dc1.mltest1.local:389</server-uri>
  <search-base>CN=Users,DC=MLTEST1,DC=LOCAL</search-base>
 </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