LDAP: error code 49

Hi,
does the sAMAccountName attribute contain the value with domain (user@domain) and not the user only? Try entering the username without domain or change the user-search-filter to something like (&(objectClass=user)(userPrincipalName={0})) as documentation suggests.