Script functions reference > Script functions in alphabetical order > L > LdapGetObjectByDN

LdapGetObjectByDN
Syntax
LdapGetObjectByDN(connName, dn);
connName 
dn
The distinguished name of the object (entry) to be retrieved. For example, the distinguished name might consist of the objects uid, ou, and dc. Note that the parameters must be given in exact order from the leaf entry to the root entry.
dc is the first level or root level to be specified, i.e. the organization to which the object belongs, ou is the second level, i.e. the parent node of the object, and the uid is the ID of the specific user or object.
Description
Searches the LDAP directory for a specific object.
Returns
entryID
If the search is successful the entryID of the object found. The entryID can be used with subsequent calls to access entry attributes.
""
Example
$groupuser=ldapGetObjectByDN("con","uid=123456, ou=People,dc=streamserve,dc=com");
In this example, the ID of the object with username 123456 in the People group, in the streamserve.com organization is stored in the groupuser variable. The variable can then be used in subsequent calls to access the attributes of the object.
OpenText StreamServe 5.6.2 Updated: 2018-01-26