# Using Windows AD Authentication With NEST

**URL:** <https://discuss.elastic.co/t/using-windows-ad-authentication-with-nest/276085>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [June 16, 2021, 5:58am UTC](https://discuss.elastic.co/t/using-windows-ad-authentication-with-nest/276085 "2021-06-16T05:58:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abushokry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abushokry/32/90379_2.png) [@abushokry](https://discuss.elastic.co/u/abushokry)\
**Post date:** [June 16, 2021, 5:58am UTC](https://discuss.elastic.co/t/using-windows-ad-authentication-with-nest/276085/1 "2021-06-16T05:58:26Z")

</div>

Hi All,

I'm trying to use the NEST .net Client to connect to elastic search using the identity of the App Pool account. i.e. without Basic Auth nor API Keys. I'm unable to find a way to get that done. Generally, when dealing with the .Net HttpClient, I can set it to use the DefaultCredentials, which will use Windows Auth to pass the current user's Windows Identity, which is in an IIS scenario, would be the app pool identity. But that's not possible with the NEST ConnectionSettings

Has anyone been successful in doing that before?

Your help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 14, 2021, 5:58am UTC](https://discuss.elastic.co/t/using-windows-ad-authentication-with-nest/276085/2 "2021-07-14T05:58:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
