Share all details about your problem, including any error messages you may have received.
Hi everyone,
I want to prune some custom identity events from the identities because we are no longer using the events we previously created. These events were used to send notifications about birthright roles with their details. Since this functionality is no longer required, can anyone help with cleaning up these events?
As a first step, you can disable these events. Once you are confident, you can delete the respective ‘Identity Trigger’ event definition from the debug page.
Hi @pattabhi thanks for your response. This information is very helpful to me. However, the main issue is that I can still see the background workflow cases, and all pending work items seem to have been pruned. Yet, some user events are still showing as if they’ve looped around 1000 times due to a rule failure. I can’t share them due to our policies, but I’d be very happy if you could suggest any other way to remove them.
Hello @hs25102025 as @pattabhi mentioned, that should be enough for pruning the events. However, since you’re still seeing them, you can try the code below once. Before that, let me explain, all the identity events can be found in the table spt_audit_event(By following this doc Find identity event.) In this table, you can see details such as the action, target identity, and whether the event was processed for the user. You can retrieve these attributes and values and remove the corresponding entries from the table if needed.
First, try it for a single identity, and then update the string3 value based on your identity event.
If that works, you can modify it to apply to all users who are part of the event. Make sure you are not removing standard ones.
I recommend exporting those events before deleting them. As others have mentioned, you’ll need to create a custom rule since there’s no out-of-the-box functionality to prune them. In addition to deleting the events, ensure that the corresponding audit actions are also deleted or disabled.