- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 01:37 AM
Hello,
We recently imported user records from one instance to other. Due to this import Roles associated to users also got imported
We want to remove roles associated to user records and option not available
We checked option not available on 'sys_user_has_role' table to delete these records
Is there any way to remove/delete these roles from user record ?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 02:04 AM
Hi @Shridhar1 ,
The challenge here is that the roles are inherited. So you can't delete them directly through a script as well.
You first need to set inherited as 'false' and then perform the delete action using a background script.
You can do both in the same script execution.
Refer below:
Please mark this as helpful/correct for others to benefit from this.
Thanks,
Aishwarya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 02:47 AM
Glad to know Shridhar!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 02:15 AM
Hello,
The reason why you are not able to remove this role from the User is because they are inherited role:-
That means these user have some role which is granting them all these role. So you cannot individually remove these roles without removing the parent role.
To check which is the parent role click on the role inheritance map you will see something as below:-
So either remove the parent role
OR
Go to roles and you will need to remove the child role from the parent role:-
Please mark my answer as correct based on Impact.