Configure ldap authentication (active directory)

Hello, i am having issues authenticating with active directory.
Ejabberd is running on my pc, which connects to the ldapserver, which acts for the domain mycompany.com
Here is my setup, including only the lines i have modified:

{hosts, ["mycompany.com"]}.
{auth_method, ldap}.
{ldap_servers, ["ldapserver"]}.
{ldap_uids, "samAccountName"}.
{ldap_base, "dc=mycompany,dc=com"}.
{ldap_rootdn, "CN=someuser,CN=Users,DC=mycompany,DC=com"}.
{ldap_password, "userpassword"}.

Ejabber 2.0 starts fine (windows), and i configured miranda im this way:

username: myuser
password: mypass
loginserver: mycompany.com
connectionhost: mylocalpc (this is the dns name of my pc that is running ejabberd

It says authentication failed.

The logs say:

I(<0.419.0>:ejabberd_c2s:474) : ({socket_state,gen_tcp,#Port<0.401>,<0.418.0>}) Failed legacy authentication for myuser@mycompany.com/Miranda

This is active directory running on windows 2000.

Port query says:

subschemaSubentry: CN=Aggregate,CN=Schema,CN=Configuration,DC=mycompany,DC=com
dsServiceName: CN=NTDS Settings,CN=ldapserver,CN=Servers,CN=mycompany,CN=Si
tes,CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
defaultNamingContext: DC=mycompany,DC=com
schemaNamingContext: CN=Schema,CN=Configuration,DC=mycompany,DC=com
configurationNamingContext: CN=Configuration,DC=mycompany,DC=com
rootDomainNamingContext: DC=mycompany,DC=com
supportedControl: 1.2.840.113556.1.4.319
supportedLDAPVersion: 3
supportedLDAPPolicies: MaxPoolThreads
highestCommittedUSN: 11215125
supportedSASLMechanisms: GSSAPI
dnsHostName: ldapserver.mycompany.com
ldapServiceName: mycompany.com:ldapserver$@mycompany.COM
serverName: CN=ldapserver,CN=Servers,CN=mycompany,CN=Sites,CN=Configuration
,DC=mycompany,DC=com
supportedCapabilities: 1.2.840.113556.1.4.800
isSynchronized: TRUE
isGlobalCatalogReady: TRUE

Syndicate content