Remove users from a group

Rachael12
Tera Contributor

I have script which works fine to remove users from a group when an admin places a request but fails when ITIL/end user places a request.
In order to mitigate this, I have created a subflow and trying to call it from the workflow.

In the subflow, I am using the sys_grp_members to extract the group and user relationship. The subflow works fine for single user and removes it from the group but fails when there are multiple users.

Please suggest how to achieve for multiple users.

Also how to call a subflow from a workflow.

8 REPLIES 8

@Rachael12 

So it's deleting only 1 and when it iterates to 2nd iteration what error it shows?

share screenshots

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

No as of now this is not working.

Deepak Shaerma
Mega Sage

hi @Rachael12 

if ITIL users lacking access to delete records from the group member table, you need to open the properties of your Subflow and ensure the "Run As" setting is set to "System User". This is what actually bypasses the ACLs.

'Run as' is set to 'System User', it is the only reason I have switched on flow designer.