using domain user account for ansible_user on inventory

Can someone let me know if I can using Windows AD domain user account for the ansilbe_user on the inventory file. I have no problem using the windows local user account , but could not establish connection using AD account

I have used :
adusername@MYDOMAIN.COM
adusername%MYDOMAIN.COM

None of them worked.

error message:
msg": “ssl: the specified credentials were rejected by the server”,

Here is my host vars config

ansible_user=adusername@MYDOMAIN
ansible_password=‘myadpassword’
ansible_port=5986
ansible_connection=winrm
ansible_winrm_scheme=https
ansible_winrm_server_cert_validation=ignore
ansible_winrm_kerberos_delegation=true

Thanks for any input.

The problem here is that it’s using Basic auth for the authentication which only works for local accounts. You either need to setup Kerberos auth or use ntlm. Both can be specified with ansible_winrm_transport (ntlm or kerberos).