You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-09-18] [$125] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. #98996
Updated 2026-08-20: Corrected based on feedback from trjExpensify.
Summary
This is not a bug. During Submit onboarding, when a user tries to add a work email that is a domain-controlled login for an existing Expensify account, the AddWorkEmail request is rejected. That rejection is expected, intentional behavior for domain-controlled accounts.
What happens
Entering an email on a validated / domain-controlled corporate domain triggers AddWorkEmail, which errors out because the email is a domain-controlled login tied to an existing account. The email isn't added and no magic code is sent — which is correct for a domain-controlled account.
if (workDomainAccountID && Domain::isValidated(db, workDomainAccountID)) {
STHROW("401 work domain is controlled");
}
Solution
Improve the error message copy shown to the user in this scenario to read:
Couldn’t add work email email@domain.com is a domain controlled login for an existing Expensify account.
@MelvinBot this isn't a bug per se. The AddWorkEmail logs shows that the user hit this error which is legit for a domain controlled account.
To that end, can you update the OP of this issue to reflect that, and the solution we'll implement is to improve the error message copy we display to the user in this scenario to read:
Couldn’t add work email email@domain.com is a domain controlled login for an existing Expensify account.
Done — I've updated the OP to reflect that this isn't a bug: the AddWorkEmail rejection for a domain-controlled login on an existing account is expected behavior, and the agreed solution is to improve the error copy to:
Couldn’t add work email email@domain.com is a domain controlled login for an existing Expensify account.
The original diagnosis (framed around User_SignUp / ResendValidateCode) has been replaced accordingly.
changed the title [-]Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+]on Aug 20, 2026
changed the title [-][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+]on Aug 20, 2026
changed the title [-][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+]on Aug 20, 2026
changed the title [-][Due for payment 2026-09-18] [$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/-][+][Due for payment 2026-09-18] [$125] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+]on Sep 24, 2026
Activity
trjExpensify commentedon Aug 20, 2026
Commented here, looks intentional: https://expensify.slack.com/archives/C07HPDRELLD/p1787228259067559?thread_ts=1787118976.436959&cid=C07HPDRELLD
trjExpensify commentedon Aug 20, 2026
@MelvinBot this isn't a bug per se. The AddWorkEmail logs shows that the user hit this error which is legit for a domain controlled account.
To that end, can you update the OP of this issue to reflect that, and the solution we'll implement is to improve the error message copy we display to the user in this scenario to read:
MelvinBot commentedon Aug 20, 2026
Done — I've updated the OP to reflect that this isn't a bug: the
AddWorkEmailrejection for a domain-controlled login on an existing account is expected behavior, and the agreed solution is to improve the error copy to:The original diagnosis (framed around
User_SignUp/ResendValidateCode) has been replaced accordingly.view run
[-]Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+]melvin-bot commentedon Aug 20, 2026
melvin-bot commentedon Aug 20, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abzokhattab (
External)melvin-bot commentedon Aug 20, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022090537529042310902
[-][$50] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/+][-][$250] Submit onboarding self-signup can't send magic code when switching to a domain-controlled email[/-][+][$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+]melvin-bot commentedon Aug 20, 2026
32 remaining items
melvin-bot commentedon Sep 17, 2026
Payment Summary
Resolving PRs:
Show a specific error when adding a domain-controlled work email during onboarding #99108
[No QA] Docs updates for E/A#99108 troubleshoot adding a work email during setup #100633
Reviewer: @abzokhattab owed $50 via NewDot
BugZero Checklist (@mallenexpensify)
abzokhattab commentedon Sep 18, 2026
kind reminder on #98996 (comment) @rlinoz
mallenexpensify commentedon Sep 22, 2026
@rlinoz 👀 above plz.
rlinoz commentedon Sep 23, 2026
@abzokhattab are we you with $125? It is true it got a bit more complex, but just a little.
abzokhattab commentedon Sep 23, 2026
@rlinoz fair enough yes
cc @mallenexpensify
[-][Due for payment 2026-09-18] [$50] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/-][+][Due for payment 2026-09-18] [$125] Add work email - update the copy of the error modal when it fails fo rthe domain controlled login restriction. [/+]melvin-bot commentedon Sep 24, 2026
mallenexpensify commentedon Sep 24, 2026
Payment Summary
Contributor+: @abzokhattab due $250 via NewDot
quinthar commentedon Sep 27, 2026
Approved $250 to @abzokhattab