if I change the dn_lookup_attribute to SAMAccountName I can login using the form mydomain\myuser, but authorization with tag_queries doesn't work; my guess is that it tries to match the fully qualified username (domain\user) with the list of usernames only that are members of those groups.
I've read in the documentation, and I see in the logs, that there are two new variables ad_domain and ad_user that can be used instead of username, but I don't get where I should indicate those in order to have the ldap_plugin to use them...
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP filling template "${username}" with
[{username,<<"MYDOMAIN\\myuser">>},{ad_domain,<<"mydomain">>},{ad_user,<<"myuser">>}]
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP template result: "MYDOMAIN\myuser"
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search request = {'SearchRequest',"DC=mydomain,DC=net",wholeSubtree,derefAlways,0,0,false,{equalityMatch,{'AttributeValueAssertion',"SAMAccountName","MYDOMAIN\\myuser"}},["distinguishedName"]}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',2,{searchResRef,["ldaps://...,DC=mydomain,DC=net"]},asn1_NOVALUE}}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',2,{searchResRef,["ldaps://...,DC=mydomain,DC=net"]},asn1_NOVALUE}}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',2,{searchResRef,["ldaps://...,DC=mydomain,DC=net"]},asn1_NOVALUE}}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',2,{searchResDone,{'LDAPResult',success,[],[],asn1_NOVALUE}},asn1_NOVALUE}}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = searchResDone
2020-05-22 08:56:06.207 [warning] <0.527.0> Searching for DN for MYDOMAIN\myuser, got back []
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP CHECK: does MYDOMAIN\myuser have tag administrator?
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP evaluating query: {in_group,"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net"}
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP evaluating query: {in_group,"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net","member"}
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP filling template "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net" with
[{username,<<"MYDOMAIN\\myuser">>},{user_dn,"MYDOMAIN\\myuser"},{ad_domain,<<"mydomain">>},{ad_user,<<"myuser">>}]
2020-05-22 08:56:06.207 [info] <0.527.0> LDAP template result: "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net"
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search request = {'SearchRequest',"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net",baseObject,derefAlways,0,0,false,{equalityMatch,{'AttributeValueAssertion',"member","MYDOMAIN\\myuser"}},["objectClass"]}
2020-05-22 08:56:06.207 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',3,{searchResDone,{'LDAPResult',success,[],[],asn1_NOVALUE}},asn1_NOVALUE}}
2020-05-22 08:56:06.223 [info] <0.1105.0> LDAP network traffic: search reply = searchResDone
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP evaluated in_group for "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net": false
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP DECISION: does MYDOMAIN\myuser have tag administrator? false
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP CHECK: does MYDOMAIN\myuser have tag management?
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP evaluating query: {in_group,"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net"}
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP evaluating query: {in_group,"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net","member"}
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP filling template "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net" with
[{username,<<"MYDOMAIN\\myuser">>},{user_dn,"MYDOMAIN\\myuser"},{ad_domain,<<"mydomain">>},{ad_user,<<"myuser">>}]
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP template result: "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net"
2020-05-22 08:56:06.223 [info] <0.1105.0> LDAP network traffic: search request = {'SearchRequest',"CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net",baseObject,derefAlways,0,0,false,{equalityMatch,{'AttributeValueAssertion',"member","MYDOMAIN\\myuser"}},["objectClass"]}
2020-05-22 08:56:06.223 [info] <0.1105.0> LDAP network traffic: search reply = {ok,{'LDAPMessage',4,{searchResDone,{'LDAPResult',success,[],[],asn1_NOVALUE}},asn1_NOVALUE}}
2020-05-22 08:56:06.223 [info] <0.1105.0> LDAP network traffic: search reply = searchResDone
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP evaluated in_group for "CN=RabbitAdmins,OU=Security Groups,DC=mydomain,DC=net": false
2020-05-22 08:56:06.223 [info] <0.527.0> LDAP DECISION: does MYDOMAIN\myuser have tag management? false
2020-05-22 08:56:06.223 [info] <0.1104.0> LDAP DECISION: login for MYDOMAIN\myuser: ok