Get one’s just deserts

To get what one deserves.

The apartment manager got her just deserts when she was fired for bothering the tenants.