# NTLM Authentication in Elastic Synthetics

**URL:** <https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247>\
**Category:** Synthetics\
**Created:** [March 12, 2024, 4:36pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247 "2024-03-12T16:36:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [March 12, 2024, 4:36pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247/1 "2024-03-12T16:36:20Z")

</div>

I am using Elastic Synthetics to monitor applications in our environment. I'm writing the majority of them as journeys and pushing them to Synthetics.

The issue is that we have a few apps which use NTLM authentication, which is not directly supported by Synthetics. This is an issue which has been discussed in Elastic Beats Issues on Github, and user @PaulB-Elastic the following in [this response](https://github.com/elastic/beats/issues/22207#issuecomment-726199324):

> An alternative solution would be to implement this with the new [Synthetics](https://www.elastic.co/guide/en/observability/7.10/synthetic-monitoring.html) offering, where you have full JavaScript capabilities that you use can build the NTLM auth into the script yourself. You would then also have a full browser and user journey capabilities to test more than just the authentication, but continue interactions in the browser beyond the authentication.

This would satisfy my use case perfectly, but I haven't managed to successfully do this. Are there any examples of using JavaScript or TypeScript for this purpose?

---

<div class="post-metadata">

**Author:** ![jkambic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jkambic/32/53306_2.png) [@jkambic](https://discuss.elastic.co/u/jkambic)\
**Post date:** [March 12, 2024, 8:29pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247/2 "2024-03-12T20:29:11Z")

</div>

Hi @DougR, thanks for your interest in Synthetics; hopefully I can help you out.

If you're asking about how to do NTLM auth in node, I don't know much about it but there are libraries like [this one](https://github.com/SamDecrock/node-http-ntlm) that may help.

If you're wondering how to create monitors that allow for custom scripting, I'd recommend checking out the docs for [Project Monitors](https://www.elastic.co/guide/en/observability/current/synthetics-get-started-project.html#synthetics-get-started-project-init), which will explain how this is done.

Project monitors allow you to create a complete node package for your monitoring, with a `package.json`, etc., and you can include any third party libs (like the auth one I linked to above) you may need, as long as they're pure JS. When you're ready, you can simply `npm run push` to host/run your monitors on your Stack.

If you need to learn more about Synthetics in general, there's an [intro doc](https://www.elastic.co/guide/en/observability/current/monitor-uptime-synthetics.html#monitor-uptime-synthetics) that includes a [Getting Started](https://www.elastic.co/guide/en/observability/current/synthetics-get-started.html) guide.

If you need to know more don't hesitate to reach back out to us here.

---

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [March 12, 2024, 8:33pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247/3 "2024-03-12T20:33:57Z")

</div>

I'm specifically looking for info on doing NTLM auth in node. I've been working with the httpntlm library with little success, so I was hoping for a working example. ☹

I've looked at the specific module you recommended, but it uses httpntlm under the hood to manage authentication, so I went directly to httpntlm. I will check it out again though.

Thx.

---

<div class="post-metadata">

**Author:** ![Andrew\_Cholakian1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrew_cholakian1/32/3612_2.png) [@Andrew\_Cholakian1](https://discuss.elastic.co/u/Andrew_Cholakian1)\
**Post date:** [March 12, 2024, 9:16pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247/4 "2024-03-12T21:16:36Z")

</div>

Unfortunately it's not a focus for us and not something I've heard of others trying / having success with. The tried and true method is to use a sort of NTLM proxy.

---

<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:** [April 9, 2024, 9:16pm UTC](https://discuss.elastic.co/t/ntlm-authentication-in-elastic-synthetics/355247/5 "2024-04-09T21:16:51Z")

</div>

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