- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 04:41 AM - edited 09-26-2023 04:42 AM
Hello All,
I've a request to remove a user from the groups with ITIL role if he doesn't login for 60 days by only using Flow Designer. Please help me with the design flow. Thanks in Advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 06:18 AM
I hope this helps
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 05:12 AM
Hi,
Follow the below steps:
1) Create a flow with trigger as Daily and set time as time when you want to run this flow (suggest early hours like 1:00 AM
2) Inside flow create lookup record and select table as sys_user and condition as "last login" before "last 30 days)
3) Create for each loop and select the output of previous step
4) Create a script and check all the groups where user is member of (sys_user_grmember table) and then check whether this table has ITIL access, if yes then delete the record.
Let me know if you need more detail
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 05:27 AM
I basically need help to create the script in script action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 05:27 AM
Palanikumar has already shared the steps. where are you stuck or what did you start with?
This link has solution with screenshots. please update it for 60 days
Remove User Group Roles if not logged in last 35 Days - Using Only Flow Designer
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2023 05:59 AM
I want to remove the user from all the groups that has ITIL role and add him to a group with a Non-ITIL group. I've worked till the logic already from creating Schedule trigger to getting the user from sys_user_grmember table. I'm stuck at getting the groups with 'ITIL' role from the list of the user's groups from grmember table.