# Node-red-contrib-better-ldap-servicely and msg.payload

**URL:** <https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188>\
**Category:** General\
**Created:** [8 August 2022 19:03 UTC](https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188 "2022-08-08T19:03:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![billyballbag](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/billyballbag/32/80477_2.png) [@billyballbag](https://discourse.nodered.org/u/billyballbag)\
**Post date:** [8 August 2022 19:03 UTC](https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188/1 "2022-08-08T19:03:15Z")

</div>

Hi there! me again 🙂

I'm trying to pass a value into an LDAP query using node-red-contrib-better-ldap-servicely but the result is showing as undefined.

Has anyone encountered this?

 ![Screenshot 2022-08-08 at 20.02.09](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f92aaac795aeb732467e28a4583a9574162ba42b.png)  
 ![Screenshot 2022-08-08 at 20.02.33](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/db2eb68033206c19a21f86824a0a0748ca1d64a0.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [8 August 2022 19:53 UTC](https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188/2 "2022-08-08T19:53:40Z")

</div>

Looking at [the src code](https://github.com/Servicely/node-red-contrib-better-ldap-servicely/blob/a6061b505e6d9a4987c92941713c4a19b512d6e1/transports/ldap/index.js#L181), the filter field accepts mustache - so try `(employeeID={{payload.employeeID}}` (assuming `msg.payload` is an object with a property named `employeeID`)

---

<div class="post-metadata">

**Author:** ![billyballbag](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/billyballbag/32/80477_2.png) [@billyballbag](https://discourse.nodered.org/u/billyballbag)\
**Post date:** [8 August 2022 23:32 UTC](https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188/3 "2022-08-08T23:32:10Z")

</div>

Thanks for the reply!

I've altered my approach now, with my flow I now retrieve all of the LDAP objects and split them before running them through the ldap-update node now, I've tried a few things to pass over the msg.payload.dn into the update node but it seems to reference msg.payload.dn as a string despite trying braces and moustaches, any suggestions?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 October 2022 23:32 UTC](https://discourse.nodered.org/t/node-red-contrib-better-ldap-servicely-and-msg-payload/66188/4 "2022-10-07T23:32:24Z")

</div>

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