Failed to Search Ldap Entries By Keyword after installing ALM 12.21 patch 1

  • KM02143691
  • 19-Feb-2016
  • 19-Feb-2016


Configuration steps to fix the error message "Failed to Search Ldap Entries By Keyword" while importing users from LDAP


After installing ALM 12.21 patch 1, an error message would appear when performing a user search on LDAP. The error would state the following:

Failed to Search Ldap Entries By Keyword;

Stack Trace:
LDAPSearchException(resultCode=2 (protocol error), numEntries=0, numReferences=0, errorMessage='Bad search filter')
at com.hp.alm.platform.ldapv2.UnboundidLdapTemplate.searchWithListener(
wrapped in com.hp.alm.platform.exception.CTdException:
at com.hp.alm.platform.ldapv2.UnboundidLdapTemplate.searchWithListener(………………….


This LDAP error code indicates a malformed request sent to it from the ALM server. The problem was found to be a parameter setup on the Site Administrator which had the incorrect value set up. In this specific case, the filter request to search for users is not matching to any data on the LDAP server.


To solve this problem please perform the following steps:

1. Browse to the Site Administrator.
2. Open the Site Configuration tab.
3. Locate the following parameter: LDAP_USER_SEARCH_FIELDS
4. Change the parameter value to USERNAME=Y.

After the site configuration parameter value is changed, the site administrator will be able to import users from LDAP using the Search users by Keyword option without any error message.