# Connecting to Windows AD accounts

**URL:** <https://forum.ansible.com/t/connecting-to-windows-ad-accounts/20231>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [January 15, 2016, 6:17pm UTC](https://forum.ansible.com/t/connecting-to-windows-ad-accounts/20231 "2016-01-15T18:17:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayur\_Barge](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@Mayur\_Barge](https://forum.ansible.com/u/Mayur_Barge)\
**Post date:** [January 15, 2016, 6:17pm UTC](https://forum.ansible.com/t/connecting-to-windows-ad-accounts/20231/1 "2016-01-15T18:17:10Z")

</div>

Is anyone facing  
FAILED =\> 401 Unauthorized. basic auth failed  
issue for AD domain account

what could go wrong ?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [January 18, 2016, 5:24pm UTC](https://forum.ansible.com/t/connecting-to-windows-ad-accounts/20231/2 "2016-01-18T17:24:01Z")

</div>

There’s a few things that could be wrong

1/ the password supplied is not correct for the user you are connecting as

2/ you must specify the domain in UPPER CASE letters.

3/ you must use the full domain name, not just the first part

so

[user@MY.COMPANY.COM](mailto:user@MY.COMPANY.COM)  
not  
user@MY

3/ you must use an @ to separate between the username and the domain name

Probably others too, but check these first.

Also check the windows event viewer to see if the login request is reaching your windows machine.

Hope this helps,

Jon
