Troubleshooting Tip: LDAP Troubleshooting using 'diagnose test authserver ldap' and 'diagnose test authserver ldap-search' commands
Description | This article describes how to troubleshoot and verify LDAP users and groups using the 'diagnose test authserver' commands. |
Scope | FortiGate. |
Solution | To verify if LDAP user authentication is successful and fetching the correct user group membership, run the following command: Â Â Example: The LDAP server is configured on the FortiGate as follows: Â
 ![]()  To search for LDAP object(s), such as the list of users in a group given an LDAP filter, use the following command: Â
1: StartTLS. The connection begins unencrypted and then upgrades to a secure connection using TLS. 2: LDAPS. The connection is encrypted from the start using SSL/TLS.
0: Base object only (search just the exact DN specified). 1: One level (only immediate children of the base DN). 2: Subtree (search the entire directory tree under the base DN). The <page_no> option controls the results that are displayed. Each page displays 1000 entries. To view the next 'page' or 1000 entries, the 'page' number needs to be entered. The first page is '0' or blank, the second page is '1', the third page is '2', etc.
  Run the below command to list the result of the given LDAP filter:   ![]() Â
 Run the below command to list the result of the given LDAP filter:   ![]()  Related article: Troubleshooting Tip: FortiGate LDAP troubleshooting and debug logs created by fnbamd |



