The modals were using selectedUser.userId but the user object has the field named id, not userId. This caused undefined to be passed to the backend, resulting in "Invalid user ID" error when trying to impersonate or change user roles. Co-Authored-By: Claude <noreply@anthropic.com>