- 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 01:57 AM
Hi Shridar,
You cannot delete the role from here these roles are in sys_user_role table. You need to click edit button and remove the groups you want from slush bucket in user record
And if you want to delete the role go to sys_user_role
Mark Correct and Helpful if it helps.
***Mark Correct or Helpful if it helps.***

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 01:58 AM
***Mark Correct or Helpful if it helps.***
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2022 02:08 AM - edited 11-01-2022 02:09 AM
For user records no groups were showing
Also I tried removing users from 'sys_user_role' but upon clicking Edit button these user records not showing in the list
- 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:45 AM
Thank you Aishwarya
This script worked, I could able to remove user roles