diff --git a/app/apis/personio/PersonioApiController.ts b/app/apis/personio/PersonioApiController.ts index 622266fa..ff5d1ad5 100644 --- a/app/apis/personio/PersonioApiController.ts +++ b/app/apis/personio/PersonioApiController.ts @@ -117,15 +117,6 @@ export async function initializePersonioApi( let employeeData = await fetchWithPersonioAuth(url); - if (!employeeData.success) { - // Try with switched first and last name - const [lastName, firstName] = username.split("."); - const mailAddress = `${firstName}.${lastName}@${DIGITALSERVICE_MAIL_DOMAIN}`; - url.searchParams.set("email", mailAddress); - - employeeData = await fetchWithPersonioAuth(url); - } - if (!employeeData.success) { throw new Error("Personio employee not found"); }