Why I can't delete some users from application/user management screen?

Why I can't delete some users from application/user management screen?

  
I get the following error when trying to delete this user, why?


In this case because there is a foreign key referencing this user.

You need to make sure that all entities referencing the user also get deleted before being able to delete a user.
What entities?

You mean a role or a group or a team?
Could be any entity referring to the User record, in this case, "Device". Highly suggest that you NEVER attempt to delete User records, it's going to cause these errors. Just set the "IsActive" attribute to "False" and save it.

J.Ja
Got it.