Remove User Group Roles if not logged in last 35 Days - Using Only Flow Designer

Piyush Kumar
Kilo Contributor

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

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

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:

find_real_file.png

Look up the users:

find_real_file.png

 

Find the groups the user is in:

find_real_file.png

 

For each of the found records we delete:

find_real_file.png

View solution in original post

14 REPLIES 14

Hi,

Have u lookup the records?

First lookup then delete.

 

Thanks

Sudhanshu

You can test the Flow and see the results:

find_real_file.png

find_real_file.png

find_real_file.png

I then check the records (no group for the user so the 0 results I got is correct):

find_real_file.png

 

Please don't forget to mark helpful, because it takes quite some effort.

find_real_file.png

Ok there are 29 users. But seems like they do not have groups. Did you check the users? Or at least some of the users?

find_real_file.png

If you want you can add the same you did for Group members Records but then for the Roles table: "sys_user_has_role":

find_real_file.png

Total flow is then:

find_real_file.png