xdmp:ldap-lookup( $DN as xs:string, [$options as (element()|map:map)?] ) as element()*
Returns an ldap entry.
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>
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.