- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2025 09:26 AM
I've noticed how we can get duplicate records in sys_user_grmember (same user/group combo existing on multiple records on this table). This happens because of automated processes that add members to groups without checking membership first, etc...but it happens and I want to manage this data better.
I was thinking of running a nightly script job or a flow which would delete these duplicate records, keeping the most recent one in all cases.
I do not need help with the script or flow, I got that covered...but I do want advice on my theory/thought process, if anyone has any.
I cannot imagine any negative down-stream effects which would come from deleting these duplicates...but I don't know of any oob platform features which may rely on this capability (having a user essentially be a member of a group "more than once"), that we will not be able to leverage in the future, which relies on this configuration choice....and I call it a "configuration choice" because it seems to me like it would otherwise be a good idea to include this type of maintenance oob without me needing to discover this and correct it...
...thoughts?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2025 10:13 AM
Hi @jMarshal, I’d recommend de-duplicating the table first and then creating a unique database index on the user and group columns. That will prevent duplicate memberships from being created at the database level going forward and eliminate the need for ongoing cleanup.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2025 09:20 AM
Thanks, it's very helpful