- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
05-14-2021 11:59 AM
Hi,
I am currently building a new PlayBook and in one part of that PlayBook, I am trying to add computers, in an XSoar List, to a specific AD group.
- I Created a List that contains 2 endpoints separated with a comma ","
- My Playbook is using the Active Directory Query v2: ad-add-to-group
- Field "computer-name" is filled with the query referencing my XSoar List: ${lists.MyListName}
The problem I am facing is that it is not working with multiple values in my list. If only 1 computer name is in the list, I have no problem adding that computer to the specified AD group in my PlayBook. As soon as there is 2 or more value in my list, the task failed. All value in the list is comma "," separated
Here's the full error seen in the War Room:
Thanks for your help.
06-14-2021 10:54 AM
Hey Martin!
I think the part that is creating an issue is the way the list is returning the values. Basically the list can store a chunk of data in almost any format. You can comma separate it or use newlines or whatever you want. You may have to parse the output though. Our commands can usually iterate over lists but it's going to expect something more like a json or python style list being handed to it. Use the Split transformer to break up the output to the command before it processes it. Here's an example:
Created the list as a comma separated value
If I try to print it out now you get basically a single string with all of the values. You can tell because our Print statement processed it in one command instead of iterating through each of them.
If you create a small playbook, add in the command you want to run and use a transformer like this:
Then your output will break up into an actual list and process each item individually.
I hope that helps!
06-14-2021 10:54 AM
Hey Martin!
I think the part that is creating an issue is the way the list is returning the values. Basically the list can store a chunk of data in almost any format. You can comma separate it or use newlines or whatever you want. You may have to parse the output though. Our commands can usually iterate over lists but it's going to expect something more like a json or python style list being handed to it. Use the Split transformer to break up the output to the command before it processes it. Here's an example:
Created the list as a comma separated value
If I try to print it out now you get basically a single string with all of the values. You can tell because our Print statement processed it in one command instead of iterating through each of them.
If you create a small playbook, add in the command you want to run and use a transformer like this:
Then your output will break up into an actual list and process each item individually.
I hope that helps!
06-14-2021 01:56 PM
Hi @DougCouch,
Thanks for your help here. I fixed my problem a couple of weeks ago using the exact same method using a transformer "Split" and using a comma as a delimiter.
Thanks for having taken the time to help me out.
Have a great day !
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!