Plently of Phab user.ldapquery error '{"result":null,"error_code":"ERR-INVALID-PARAMETER","error_info":"Unknown or missing ldap names: **REDACTED**"}' in Logstash. See e.g. this entry.
Taking a look at https://phabricator.wikimedia.org/conduit/method/user.ldapquery/ Phabricator Conduit expects double quotes, which we are not using, thus it errors. [ username ] is not valid, it needs ["username"].
I guess we either wrap $username with double quotes (["$username"]) or use [ json_encode($username) ]. I think the later is best.
See also T306297: Wikitech->Gerrit account block and unblock has stopped working.