- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2020 06:10 AM
Hi,
I have a requirement -
By Using Only Flow Designer remove all user roles and groups (except snc_internal) of a user if the last login time is 35 days ago.
Need to trigger daily and check for users.
Regards,
Piyush Kumar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2020 06:45 AM
Hi Piyush,
Roles should be assigned to the group. Removing the user from the group results in the roles being removed. If you have set it up property, if not, set up properly first.
For workflow you can have the Trigger being scheduled:
Look up the users:
Find the groups the user is in:
For each of the found records we delete:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2020 09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2020 12:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 12:22 PM
Not sure if something has changed on the ServiceNow side since your great solution but when I test it on my end, it doesn't run the delete action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2020 06:51 AM
Hi,
Simply trigger of the flow everyday at a specific time.
Lookup all user records which does not have logged into the system last 35 days.
For each user record
1.lookup all the roles "sys_user_has_role" in this table except for snc_internal. Delete them
2. Lookup all records in the sys_user_grmember table. Delete all records.
Thanks
Sudhanshu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2020 12:00 PM
Hi Piyush,
Hope you are doing well.
Is your question resolved? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Feel free to mark answers as Helpful if you think they are.
Thanks.
Kind regards,
Willem