Important

   

Starting version 8.9.03, BMC Server Automation is renamed to TrueSight Server Automation. This space contains information about BMC Server Automation 8.9.02 and previous versions. For TrueSight Server Automation 8.9.03 and later releases, see TrueSight Server Automation 8.9.

LDAP query basics

There are some basic concepts for creating LDAP queries.

LDAP queries typically include three parts:

  • Base distinguished name (DN) — Identifies the top level of the LDAP directory tree. For example, when querying users, you could create a base DN such as CN=Users,DC=us,DC=sso,DC=bmc,DC=com. This DN corresponds to the Users name in domain us.sso.bmc.com.
  • Filter — Specifies one or more attributes that must be fulfilled. If you are creating a query for user information, a typical filter might be objectClass=user. For a group, a typical filter is objectClass=group.
  • Attribute — Narrows the type of data for which the query is searching. If you are creating a query for user information, a typical attribute is userPrincipalName. For a group, a typical attribute is member.

For example, the following queries could be paired to obtain user information from ADsyncTestGroup and all of its subgroups.

Query components

Query results

Name: ADsyncTestGroup query
Base DN: CN=ADsyncTestGroup,OU=automation,OU=junit,DC=us,DC=sso,DC=bmc,DC=com
Filter: objectClass=group
Attribute: member

Queries for all subgroups of the group ADsyncTestGroup

Name: ADsyncTestGroup users query
Base DN: leave blank
Filter: objectClass=user
Attribute: userPrincipalName

Queries for all users of the groups identified in the associated query. If paired with the group query shown above, this query would obtain user information from ADsyncTestGroup and all of its sub-groups.

Was this page helpful? Yes No Submitting... Thank you

Comments