List deactivated users


I am looking for a possibility to query the deactivated users e.g. via the API. Is there a possibility in NC 22?
The aim should be to write to the users by e-mail and inform them that their account has been deactivated due to too many incorrect password entries. Since I don’t think that this can be done directly with NC, external systems should be used.

Thank you in advance for your support.

You can use this occ user commands.