Remove User from Assignment Group with Flow Designer

Gabriel Ho
Tera Contributor

Hi, I`m looking for an "Flow Designer" flow to remove ITIL User from her Assignment Groups.

I dont want to delete the Group, I only want an automatic flow, who can remove the selected Groups from the User Groups (selected in Catalog Item).

 

Have anyone an Idea?

I know, that I can use the table sys_user_grmembers

 

10 REPLIES 10

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

You will have to use Trigger as Service Catalog

Then use Get Catalog Variables

Then Iterate over each variable and use Delete Action

Please share your Variable and their types for catalog item

Refer below link for help; it's about adding user to group. you can enhance for user deletion from group

Automate adding members to group

Flow Designer -- Removing inactive users from groups/roles

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Gabriel Ho 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate answer as correct & helpful to close the thread.

If not, please let us know if you need some more assistance.

Regards
Ankur

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

Ed Hefford
Tera Guru

Hi @Gabriel Ho ,

Very late to the party, but here's my flow and cat item to perform the task:

find_real_file.png

Variables will show the group, then tiny Js line to reference the members of the group field, so will only show members in the 'Members' field.

find_real_file.png

find_real_file.png

Flow Steps:

1. Get cat variables

2. Trigger Event

3. For Each entry in Multi Row Variable set

4. Look up Group member (sys_user_grmember) where User is user from Mrvs AND group is Group in MRVS

I put this condition in as users can be members of multiple groups so you'll need to know which group to edit

5. Delete Record using the Lookip Group member record

6.Log

7. Close RITM

I hope this helps you or anyone else reading this post looking for an answer.

Thanks,

Ed

Thanks, I had between a different solution but your way is prettier 😄