{{[“Query For AD User”].[results].[0].[attributes].[distinguishedName]}} is still returning the same output.
Let me add that I am putting this var in an artifact to tell what is going on. For some reason it actually just adds this var to the end of the output for {{[“Query For AD User”].[results]}} as “dn”:"{{[“Query For AD User”].[results].[0].[attributes].[distinguishedName]}}"
{{[“Active Directory Users”].[results].[0].[attributes].[distinguishedName]}} has never given me issues returning the dn. I use this both in Artifacts, Joins, and always use this output as the input to any password reset, enable, or disable action.
Just curious, what does this give you in an artifact?
{{#each ["Query For AD User"].[results]}}
{{#with attributes}}
“dn”:"{{distinguishedName}}"
{{/with}}
{{/each}}
I wonder if your pulling back more than one Object?
After my LDAP queries I always do a Decision Step on the the count of results to make sure I only am working with one account. I then do a Type Converter of String to Object on [results].[0].[attributes] so further down the line I have an easy object to work with e.g. {{[“AD User”].[output].[distinguishedName]}} this is needed if you want to check this in a Decision Step to see if the dn contains an OU
We just pushed up an update to the plugin to return the number of results in a variable called count to make it a little more user-friendly. In addition, we now support the ability to query on attributes.
So far this has been working great! There was so much “extra” information that my queries were pulling back that I didn’t need. This is way cleaner. Also, the count is a nice touch, I switched my decisions to start using this