Creating Flow for Removal of Inactive Users

Service now11
Tera Contributor

I need to design a flow for removing inactive users based on certain conditions. The criteria for removal are as follows

and here I cant get the assignment groups in the flow

Users where:

Active = false, and
Last Updated is more than 1 month ago, and
They are members of specific groups (group memberships need to be removed).

The group memberships to be considered for removal are:

Specific group memberships
All assignment-group memberships (i.e., groups with Type = ITIL) and should log a delete actions

7 REPLIES 7

Ankur Bawiskar
Tera Patron
Tera Patron

@Service now11 

what should be the trigger condition for this?

what did you start with and where are you stuck?

Without this information we can't help.

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

Hi Ankur,

Here are the conditions for removing inactive user through flow Designer and I have attached what i have implemented for this.

 

  • Conditions for removal:

    • Users where Active = false and Last Updated is more than 1 month ago.
    • If they are members of certain groups, their group memberships should be removed.
  • Users inactive for less than 1 month should remain unaffected, with all their previous groups and roles preserved.

Group memberships for removal include:

  • Specific group memberships
  • All assignment-group memberships (i.e., groups with Type = ITIL)

Additional considerations:

  • The user record itself should remain untouched.
  • Cleanup cycles should run on a weekly basis in bulk.
  • Any occurrences of cleanup should be logged for audit purposes and to allow for re-establishing an account if necessary. 

     

  • Servicenow11_3-1737438502764.png

     


     

@Service now11 

so what's not working as expected?

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