How to remove roles from the inactive user records which is not associated with any groups..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 04:23 AM
we have ran the fix scripts to remove the inactive users from groups and roles table by using fix scripts.
Users are removed successfully from all their groups and their associated roles.
but when we tried to run the fix script to remove the users from "sys_user_has_role" table. its removed some roles from the users. but we still have some remained roles which is not removing from user records. (these roles are inherited = true ).
examples of roles:
cmdb_read, sn_cimaf.sn, cimaf_readsn_esm_user

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 04:36 AM
Hi,
Inherited roles mean the user was granted the role by another role. Removing the parent role should remove all the inherited roles also.
Why did you script this, and not go through the user interface, and remove the groups manually ?
Normally when a user is removed from a group, the roles granted to the group will be removed automatically. Did you use .setWorkFlow(false) in your script when updating the records?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 07:30 AM
We ran the fix scripts for inactive users records which needs to be removed from groups and roles.
so all groups and their associated roles are being removed but we found that some users are still having roles from sys_has_roles table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 08:16 AM
Yes, but this is not really answering my questions.. 😀
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-09-2024 05:01 AM
Can you tell us which script you ran?