# using domain user account for ansible\_user on inventory

**URL:** <https://forum.ansible.com/t/using-domain-user-account-for-ansible-user-on-inventory/37431>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [December 6, 2022, 4:31pm UTC](https://forum.ansible.com/t/using-domain-user-account-for-ansible-user-on-inventory/37431 "2022-12-06T16:31:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Da\_Ye](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@Da\_Ye](https://forum.ansible.com/u/Da_Ye)\
**Post date:** [December 6, 2022, 4:31pm UTC](https://forum.ansible.com/t/using-domain-user-account-for-ansible-user-on-inventory/37431/1 "2022-12-06T16:31:20Z")

</div>

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](mailto:adusername@MYDOMAIN.COM)  
adusername%[MYDOMAIN.COM](http://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.

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [December 6, 2022, 8:45pm UTC](https://forum.ansible.com/t/using-domain-user-account-for-ansible-user-on-inventory/37431/2 "2022-12-06T20:45:28Z")

</div>

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).
