**Use case**
In some organisations are using AD with hierarchical structure (nested organisation unit) and DN follow this structure. As result we can not  use permanent build_dn for users with different OU.

**Describe the solution you'd like**
Solution can be look like:
1) bind as service account
2) set dn for user_name by some filter string to user_dn
3) bind as user_dn with password
3) use user_dn with filter for group/roles fetching

This approach is implemented in Metabase.

const LDAPClient::SearchParamsList * search_params, LDAPClient::SearchResultsList * search_results) const
{
    std::optional<LDAPClient::Params> params;
    std::size_t params_hash = 0;
    {
        std::scoped_lock lock(mutex);
        
        const auto pit = ldap_client_params_blueprint.find(server);
        if (pit == ldap_client_params_blueprint.end())
            throw Exception("LDAP server '" + server + "' is not configured", ErrorCodes::BAD_ARGUMENTS);
        params = pit->second;
        params->user = credentials.getUserName();
        params->password = credentials.getPassword();
        params->combineCoreHash(params_hash);
        if (search_params)
        {
            for (const auto & params_instance : *search_params)
            {
                params_instance.combineHash(params_hash);
            }
        }
        
        if (params->verification_cooldown > std::chrono::seconds{0})
        {
            const auto cit = ldap_caches.find(server);