# Node to authenticate with AD?

**URL:** <https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809>\
**Category:** General\
**Created:** [3 June 2019 20:04 UTC](https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809 "2019-06-03T20:04:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobP](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@RobP](https://discourse.nodered.org/u/RobP)\
**Post date:** [3 June 2019 20:04 UTC](https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809/1 "2019-06-03T20:04:53Z")

</div>

I am writing an app in node red that has a GUI component that allows humans to login to a web page. To login, I want to authenticate the user against an existing AD using ADFS. Is there a node that allows me to do this? I'm not having much luck finding a solution.

I am told that if ADFS is not possible, I can authenticate using Kerberos as well.

Can anyone point me in the right direction or provide a solution?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [3 June 2019 21:03 UTC](https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809/2 "2019-06-03T21:03:42Z")

</div>

While I've never actually got round to doing this, I understand that Node-RED uses Passport which is a popular extension to ExpressJS which Node-RED uses to provide its web interfaces.

As such, there are plugins for Passport that provide both Azure Active Directory - which I think is what you want when you talk about "ADFS" since that is what connects an on-premise AD to AAD in the cloud. And also for Kerberos.

Of course, Kerberos is only suitable for LAN-based authentication and shouldn't generally be used over the Internet. It is the product of a bygone age.

To make use of AAD based logins, you will need to have access to your Azure configuration - or perhaps more likely - access to someone who is an administrator. It will require configuration in Azure.

If you really want to be a masochist, you could also use a SAML approach (again, against AAD). This is more robust but rather harder and more involved to configure.

---

<div class="post-metadata">

**Author:** ![RobP](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@RobP](https://discourse.nodered.org/u/RobP)\
**Post date:** [4 June 2019 14:56 UTC](https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809/3 "2019-06-04T14:56:35Z")

</div>

Thanks for the info. It's an on-premise AD for now, not sure what the future holds. So maybe for flexibility I should use ADFS/AD using Passport. I will read up on that.

---

<div class="post-metadata">

**Author:** ![RobP](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@RobP](https://discourse.nodered.org/u/RobP)\
**Post date:** [14 June 2019 18:58 UTC](https://discourse.nodered.org/t/node-to-authenticate-with-ad/11809/4 "2019-06-14T18:58:19Z")

</div>

With the help of a user here, I was able to get this to work inn pure javascript. See the code here: [Authenticate against LDAP in Node Red](https://discourse.nodered.org/t/authenticate-against-ldap-in-node-red/12201)
