- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 10:20 AM
Hi all, I'm thinking this should be a pretty simple solution but I'm not finding it. I'm using the Active Directory v2 spoke to get the list of groups that a user is a member of. That returns an array.string output. I'd like to take that list of groups and post it as a comment on a SCTASK.
Dragging the data pill to the work notes comments results in the following. What am I doing wrong?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:18 AM
No luck on that either. While looking at that look up action, I noticed that the PowerShell step outputs all the data that it looks up in a string format, including the membership.
This gave me the idea to copy that Look Up User in AD action and remove all the Powershell attributes it looks up except for group membership, then store the Powershell output string as the membership output. That allows the membership to be displayed in string format to be used elsewhere in the flow.
It's not the prettiest output so I might go back and do some tidying up on it, but for now, it works well enough.
I'm not sure why other solutions weren't giving us the info we were looking for. I have to assume there is some bug with the AD spoke and this array. Additionally, this action should probably be OOB for this spoke. Being able to get full group membership for a user can be useful.
I want to thank you all for responding. I learned a lot from this discussion and appreciate all the feedback!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 08:22 AM - edited 02-29-2024 08:24 AM
@DylanB ,
To give a try , change the script step input type from array.string to array.object or object and check correct input is passing to the script step
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 09:33 AM - edited 02-29-2024 09:54 AM
@sasi_v, I had thought that also. When the convert array action input is changed from an array.string to an array.object, then the action doesn't allow me to use the array.string datapill from the AD look up.
But that gives me an idea that potentially the AD look up is incorrectly classifying the member of output as an array.string when it should be an array.object. I will make a copy of the AD look up action and change that output to an array.object and see if that gets us anywhere.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:18 AM
No luck on that either. While looking at that look up action, I noticed that the PowerShell step outputs all the data that it looks up in a string format, including the membership.
This gave me the idea to copy that Look Up User in AD action and remove all the Powershell attributes it looks up except for group membership, then store the Powershell output string as the membership output. That allows the membership to be displayed in string format to be used elsewhere in the flow.
It's not the prettiest output so I might go back and do some tidying up on it, but for now, it works well enough.
I'm not sure why other solutions weren't giving us the info we were looking for. I have to assume there is some bug with the AD spoke and this array. Additionally, this action should probably be OOB for this spoke. Being able to get full group membership for a user can be useful.
I want to thank you all for responding. I learned a lot from this discussion and appreciate all the feedback!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:33 AM
What is the reason for converting it to String using an action?
I think where-ever you would like to use, you can always pass javascript:JSON.stringify(array)
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2024 11:50 AM
Hi @SanjivMeher, I'm unfamiliar with that method. Where would I enter that
javascript:JSON.stringify(array) code?