cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Regular expression to clean up AD group returned by LDAP query

Jump to solution

I am trying to remove a terminated user from all the AD permission groups using a workflow (Nintex Ent). I query LDAP first to get a list of groups, save it as a collection variable and then I want to use the For Each action with "Remove user from AD group". The problem is that the action is expecting the group name in a different format than query returns:

2016-03-02_16-25-54.png

I assume I should use a Regular Expression to fix it but what should the syntax be?

Also, I would like to save the list of all groups to my list item, preferably after fixing it with regex. How do I do that?

Labels: (1)
0 Kudos
Reply
3 Replies
Workflow Hero

Re: Regular expression to clean up AD group returned by LDAP query

Jump to solution

Use regular expression action, operation 'Replace Text', replacement text '$2\$1', pattern:

Reply
Workflow Hero

Re: Regular expression to clean up AD group returned by LDAP query

Jump to solution

Thank you - seems to be working flawlessly!

Do you know how to collect all the groups after running regular expression and save it with the item?

0 Kudos
Reply
Workflow Hero

Re: Regular expression to clean up AD group returned by LDAP query

Jump to solution

Ok - I figured that one out! I just need to use a Build String action and append.

0 Kudos
Reply