Error using Out of Box Microsoft "Remove User from Groups"

Nicole Disbro
Tera Expert

Flow intention - when a user is disabled, remove all of their MemberOf groups.

 

In my flow we look up the AD User when are trying to remove all of their groups. Look up User returns the MemberOf array.string.

 

The action in the Microsoft v2 spoke for "Remove user from groups" asks for the inputs of the UserName(which we pull from Look Up User) & the Group Names in the format of array.string (Which we get from look up user.memberof). When using this though, we keep getting this error: 

 

{
    "Action Status": {
        "code": 1,
        "message": "Error:  Invalid Group Name : com.snc.cobject.ComplexObjectCollection@3ed07c36 (Process Automation.4d3c549a874d5110f1c3a64d0ebb352a; line 39)"
    }
}

 This is us trying to stay out of box and not use anything custom. Not sure why it is not working. 

 

Has anyone got an idea on how to "Remove all user groups in AD".

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Nicole Disbro 

So what does that action have as inputs?

check this

Flow - Issue running the AD remove user from group activity inside a for each loop 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Nicole Disbro
Tera Expert

Yes - These are the inputs: 

NicoleDisbro_0-1743788121244.png

From my previous note - this is how we are setting these: "Remove user from groups" asks for the inputs of the UserName(which we pull from Look Up User) & the Group Names in the format of array.string (Which we get from look up user.memberof

 

This link looks like it is removed users from SN groups not AD groups using the Microsoft v2 spoke for "Remove user from groups".