There can be many ways for LDAP lookup to fail. Following are some scenarios:
- LDAP looks up the wrong attribute: By default, LDAP queries using the filter
(&(userPrincipalName=%s)(!(UserAccountControl:1.2.840.113522.214.171.1243:=2))). This looks up the UPN attribute of the computers within the LDAP directory.
However, the matching may need to occur on a different attribute, such as the name of the computer. Therefore, ensure the filter is defined correctly to look for the proper attribute, and that the attribute on the computer on Active Directory is defined properly.
 __cert_ldap_query-UPN = 'WIN10-01.fortiad.info'
 fnbamd_ldap_init-search filter is: (&(name=WIN10-01.fortiad.info)(!(UserAccountControl:1.2.840.1135126.96.36.1993:=2)))
In this example, the FortiGate retrieves the certificate DNS name, which is WIN10-01.fortiad.info. However, the computer name attribute of the computer is WIN10-01. So, this mismatch results in the computer not being matched during LDAP lookup.
Resolving the issue may require a new certificate. You can also configure a different filter on the FortiGate’s
user.ldap.account-key-filtersetting to look up a different attribute.