Function solution for /api/userimport/existing endpoint