So, you have experimented with midPoint. Now you have thousands of users, some roles, accounts randomly linked, unlinked and deleted and you can no longer tell what works and what does not. You want to clean it all up and start over. We know that feeling. We were there. And we still get there. Quite often. So, this is how you can clean up.

Cleaning up MidPoint

The most common reason for making the mess out of your deployment is when you are experimenting with synchronization. Usually when you are trying to pull the data from an HR system into midPoint. In that case the resource state is OK, it is not changed in any way. So all you need is to clean up midPoint data. And more precisely just the identity data: users, shadows, roles, organizations. This situation is so common that we have a special button for this. It is nicknamed "laxative button". You can find it in Configuration -> Repository Objects, click on to top-right cog button and choose "delete all identities" from the menu.

You can select what object types are going to be deleted. The data will be deleted only from midPoint repository, the resources will not be affected. This is is a nice, clean and quick way how to clean up the mess caused by import of synchronization.

Cleaning up MidPoint and Resources

If you have already provisioned accounts to the resources and want to clean them up then a different approach has to be used. The way to go is to use bulk actions to delete all users and all accounts linked to them. Like this:

<s:executeScript xmlns:s=""

This is potentially dangerous, because it is modifying resources. You may delete something that you have not intended to delete. And that may be irreversible. Use with care.


See Also