The moment an account is created but not yet claimed by its real owner is a window in which whoever acts first can own it. Invitation links, activation emails, temporary passwords and first-login codes all exist to bridge that gap, and each one is a credential in its own right. If it can be guessed, intercepted, reused or claimed by someone who only knows the victim's email address, the account belongs to the attacker before the user ever signs in. This guide covers how to design and run activation flows for workforce and customer accounts: token design, binding the claim to a verified identity, the pre-account hijacking classes described defensively, help desk checks and cleaning up accounts nobody claimed. It is written for IAM engineers and product security teams. Recovering an account the user already owns is a different problem, covered in the Account Recovery and Help Desk Security Guide.
Key takeaways
- An activation secret is a credential. Generate it with a cryptographically secure random generator, store only a hash, accept it once and let it expire in hours, not weeks.
- Verify the identifier before the account can be used. Accounts that work before the email or phone is confirmed are the root cause of most pre-account hijacking.
- Never let a temporary password become the real one. Prefer an activation link or a one-time pass that leads straight into passkey or MFA registration.
- Claiming resets everything that came before. When the real owner proves control, end earlier sessions, cancel pending changes and show any linked identities for review.
- Unclaimed accounts are dormant risk. Expire invitations, disable accounts not activated within a set period and report on them like any other stale identity.
Where account claiming happens
Any flow where an account exists, or could exist, before its owner has proved control is a claiming flow. Common examples:
| Flow | Typical claim mechanism | Main risk |
|---|---|---|
| Workforce new starter | Temporary password, one-time pass or activation email sent to a manager or personal address | Secret sent through a channel others can read; account usable before day one |
| B2B or SaaS invitation | Invite link emailed by a tenant admin | Link forwarded, leaked or accepted by the wrong person; invites never expire |
| Customer self sign-up | Email or SMS confirmation code or link | Account usable before verification, enabling pre-hijacking |
| Migrated or bulk-loaded users | "Set your password" email after a platform move | Mass phishing lookalikes; stale addresses claimed by new owners |
| Admin-created customer accounts (branch, call centre) | Activation letter, SMS code or in-person PIN | Weak caller checks; codes valid for long periods |
| Federated or social sign-up | Assertion from an identity provider | Silent merge with an existing local account on email match |
For migration specifics see the CIAM User Migration Guide, and for the wider workforce process the Joiner-Mover-Leaver Guide.
Threats: pre-claiming, link interception and enumeration
The clearest research on this is Sudhodanan and Paverd's USENIX Security 2022 paper on pre-hijacked accounts. They assumed an attacker who knows only the victim's email address and found that at least 35 of 75 popular services were vulnerable to one or more pre-hijacking attacks. The five classes, described from the defender's side:
| Class | What goes wrong | Control that prevents it |
|---|---|---|
| Classic-Federated Merge | A password account created with the victim's email is merged with the victim's later SSO sign-up, and the earlier password stays valid | Require proof of control of the existing account (for example a password reset) before merging |
| Unexpired Session | A session opened on an unverified account survives the real owner's password reset | Sign out all other sessions and revoke tokens on reset, verification or MFA enrolment |
| Trojan Identifier | An extra federated identity, email or phone is attached before the owner claims the account and persists after reset | On claim or reset, show all linked identifiers and leave them unlinked unless the owner keeps them |
| Unexpired Email Change | A pending, unconfirmed email change is confirmed later with a link that never expired | Short-lived change links; cancel pending changes on reset or claim |
| Non-verifying IdP | An identity provider that does not verify email ownership asserts the victim's address | Trust email only from providers that verify it; check the verified flag in the assertion |
Beyond pre-hijacking, activation flows face three further threats:
- Interception and leakage: activation links sit in mailboxes, ticketing systems, chat threads and browser history. Tokens in URLs can leak through the Referer header to third-party scripts on the landing page; OWASP recommends a
Referrer-Policy: no-referrerheader on token pages. - Link poisoning: if the activation URL is built from the request's Host header, an attacker can trigger an email whose link points at their own domain. OWASP advises hard-coding the base URL or validating it against an allow list.
- Enumeration: sign-up and invite-acceptance pages that say "this email is already registered" reveal who has an account. See the Account Enumeration Prevention Guide.
In ATT&CK terms the outcome is use of T1078 Valid Accounts; adding an identifier to someone else's account resembles T1098 Account Manipulation.
Secure activation token design
Treat every invite link, activation code and temporary secret with the rules you would apply to a password reset token. NIST SP 800-63B-4 does not define "activation links" as such, but its rules for comparable secrets give useful anchors: out-of-band authentication secrets of at least six digits that are valid for 10 minutes and accepted once (Sec. 3.1.3.2), binding codes of at least 112 bits when no user-entered identifier accompanies them, single use, valid for at most 10 minutes and never sent by email (Sec. 4.1.2.1), and issued recovery codes valid for 24 hours by email or 10 minutes by SMS or voice (Sec. 4.2.2).
| Property | Recommended design | Why |
|---|---|---|
| Entropy | Link tokens: at least 128 bits from a CSPRNG, URL-safe encoded. Short typed codes: six or more digits, only alongside a known identifier and strict rate limits | Long links cannot be guessed; short codes rely on attempt limits |
| Single use | Mark consumed atomically on first successful use; reject replays | Stops reuse from mailbox or log copies (ASVS 5.0 V6.4.1) |
| Expiry | Self sign-up codes: minutes. Email invites: hours to a few days, chosen by risk. Typed codes: about 10 minutes | Shrinks the interception window; aligns with 800-63B validity periods |
| Binding | Token tied server-side to one account record, one identifier and the invite's intended tenant and role | Prevents a token minted for one user claiming another (OWASP Forgot Password Cheat Sheet) |
| Storage | Store a hash of the token, never the plaintext; never log full URLs containing tokens | A database or log leak does not yield usable tokens |
| Revocation | Issuing a new invite invalidates older ones; admins can revoke pending invites | Only one live claim path at a time |
| Rate limiting | Limit attempts per code and per account; generating a new code must not reset the failure count (800-63B Sec. 3.1.3.2) | Defeats brute force on short codes |
| Delivery | Fixed, allow-listed base URL over HTTPS; no-referrer on landing page; avoid third-party scripts there | Prevents link poisoning and Referer leakage |
Email link scanners and security gateways often open links automatically. If the first GET request consumes the token, legitimate users find their link already "used". Make the landing page require a deliberate POST (a button) before the token is consumed.
Temporary passwords: risks and alternatives
Admin-set temporary passwords are the weakest common claim mechanism. They are often predictable (season plus year, a company default), shared through tickets or chat, and frequently kept as the real password. ASVS 5.0 V6.4.1 requires system-generated initial passwords or activation codes to be securely random, to expire quickly or after first use, and never to become the long-term password.
| Option | Strength | Trade-off |
|---|---|---|
| Admin-set temporary password, change at next sign-in | Low | Simple but secret is known to the admin and often shared insecurely |
| Random temporary password, single use, short expiry | Moderate | Still a password; user may reuse it elsewhere |
| Activation link to an identifier the user already controls | Moderate to high | Only as strong as that mailbox or phone |
| Time-limited one-time pass leading straight to passkey or MFA registration | High | Needs a supported identity platform and a verified hand-over |
| In-person or verified video hand-over of a hardware authenticator | Highest | Cost and logistics; suits privileged and high-risk users |
Microsoft Entra ID's Temporary Access Pass is one example of the one-time pass pattern: it is a time-limited passcode for onboarding passwordless methods. Per Microsoft's documentation the tenant default lifetime is one hour, lifetimes can range from 10 minutes to 30 days, and one-time use is off by default and can be enforced in policy; when it is, the user has 10 minutes after sign-in to finish registration. Enforce one-time use and keep lifetimes short. See the Passwordless and Passkeys Guide.
Binding activation to verified identity
A token proves only that someone holds the token. The claim is safe when the token is joined to evidence that the holder is the intended person.
- Verify before use, not after: the pre-hijacking research recommends requiring proof of email or phone control before the account can be used at all, rather than verifying asynchronously while the account already works.
- Reset state on claim: when the owner verifies, end all other sessions and tokens, cancel pending email changes and show any linked federated identities, alternate emails and phone numbers for the owner to keep or remove. ASVS 5.0 V7.4.3 requires the option to end other sessions after an authentication factor changes.
- Federated sign-up: never merge an SSO identity into an existing local account on email match alone. Require proof of control of the existing account, and accept email from an OpenID Connect provider only when the provider verifies it and the
email_verifiedclaim is true. See the Social Login and Account Linking Security Guide. - Bind the first strong authenticator immediately: activation should end with a passkey, platform authenticator or MFA method registered, not just a password set. Notify the user through a separate channel whenever an authenticator is bound, as 800-63B Sec. 4.1.2.1 requires for additional authenticators.
- Proofing for higher assurance: where the account carries money, health data or privileged access, link activation to identity proofing rather than mailbox control. See the Identity Proofing and KYC Guide.
Help desk verification for activation requests
"I never got my invite" and "my activation link expired" are routine calls, and a help desk that resends links to a new address, or reads out a temporary password, becomes the claiming flow. The MGM Resorts breach began, by the attackers' account, with a phone call to the IT help desk impersonating an employee found on LinkedIn.
- Resend only to the identifier already on record; changing the destination is a separate, higher-assurance request.
- Verify new starters through their manager or HR system of record with a call-back to a known number, never a number the caller provides.
- Never read secrets aloud or paste them into tickets; trigger a fresh token to the registered channel instead.
- Require a second approver for activation requests for privileged or executive accounts.
- Log every resend and override with the agent, reason and evidence checked.
Workforce versus customer activation
| Aspect | Workforce | Customer |
|---|---|---|
| Who creates the account | HR-driven provisioning or an admin | Usually the user; sometimes staff or a migration |
| Trusted channel available | HR record, manager, in-person or video on day one | Only the identifier given at sign-up, unless proofed |
| Preferred claim method | One-time pass with immediate passkey or MFA registration, released on start date | Verify-before-use email or SMS code, then passkey offer |
| Main threat | Social engineering of help desk; secrets shared via managers | Pre-hijacking, bots and enumeration at scale |
| Unclaimed account policy | Disable if not activated by a set number of days after start date; alert the manager | Delete unverified sign-ups quickly; limit repeat sign-ups for the same identifier |
Small organisations: use the identity platform's built-in invitation and one-time pass features, enforce single use and short expiry, and hand over credentials in person. Large organisations and consumer platforms: automate account creation from the HR system, release activation only on the start date, add bot detection to sign-up, and run activation through a single service rather than per-application flows. B2B invitations deserve their own policy; see the B2B CIAM and Organisation Management Guide.
Phased rollout
- Inventory: list every flow in the table above, its token type, lifetime, storage and delivery channel.
- Quick fixes first: hash stored tokens, enforce single use, cap lifetimes and remove tokens from logs.
- Verify before use: change customer sign-up so unverified accounts cannot sign in or hold data; pilot on a share of new sign-ups and compare completion rates.
- Replace temporary passwords: move workforce onboarding to one-time passes plus passkey or MFA registration, starting with IT and privileged users.
- Harden merges and resets: add session revocation and linked-identifier review on claim, reset and MFA enrolment.
- Test: run the five pre-hijacking classes as test cases in staging, plus link scanner and Host header tests.
- Roll back safely: keep the old flow behind a feature flag for a defined period, and never roll back token hashing or single use.
Monitoring unclaimed and dormant accounts
An account that was created and never claimed has an owner on paper only. It still has a username, may have group memberships and can be claimed by whoever completes activation. Treat it as dormant: CIS Controls v8.1 Safeguard 5.3 (Disable Dormant Accounts) and NIST SP 800-53 AC-2(3) Disable Accounts both apply. See the Orphaned and Dormant Accounts guide.
Log and alert on:
- Invite created, resent, accepted, expired and revoked, with actor and destination.
- Activation from a country, network or device type unusual for the organisation or tenant.
- Identifier or authenticator changes within the first 24 hours after activation.
- Repeated sign-up attempts for the same email or phone, and spikes in unverified sign-ups.
- Help desk resends to a changed destination.
Metrics that show the flow is working:
- Median time from invite to claim, and the share claimed within the token lifetime.
- Unclaimed accounts older than policy, which should trend to zero.
- Share of activations ending with a phishing-resistant authenticator registered.
- Tokens with lifetimes above policy or stored in plaintext, found in configuration reviews.
- Help desk activation overrides per month, and the share with full verification evidence.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AA-01, PR.AA-02 | Identities and credentials managed; identities proofed and bound to credentials |
| NIST SP 800-53 Rev 5 | AC-2, AC-2(3), IA-4, IA-5, IA-12 | Account management, disabling unused accounts, identifiers, authenticator management, proofing |
| NIST SP 800-63B-4 | Sec. 3.1.3, 4.1.2.1, 4.2.2, 4.6 | Code validity, binding codes, issued codes, notifications |
| OWASP ASVS 5.0 | V6.4.1, V6.3.8, V7.4.3 | Initial secrets, no account inference, session termination after factor change |
| CIS Controls v8.1 | 5.3 | Disable dormant accounts |
| MITRE ATT&CK | T1078, T1098, T1136 | Valid accounts, account manipulation, account creation |
Common failure patterns
- Accounts usable before verification: the enabling condition for every pre-hijacking class. Verification that happens "later" is too late.
- Invites that never expire: links accepted months later by whoever now holds the mailbox or the forwarded email.
- Temporary password becomes permanent: "Welcome2026!" set by an admin, shared in a ticket and never changed because the change prompt was skipped.
- Silent federated merge: an SSO sign-up joined to an existing local account on email match, keeping a password the owner never set.
- Help desk resends to a new address: the claim is handed to whoever called, as in the help desk impersonation pattern behind the MGM Resorts breach.
- Tokens in logs and analytics: full activation URLs captured by web server logs, proxies or third-party scripts on the landing page.
Practitioner checklist
- Inventory every activation, invitation and first-login flow with its token type, lifetime and channel.
- Generate tokens with a CSPRNG, store only hashes, accept them once and set short expiries.
- Build activation URLs from a fixed base URL and serve token pages with
no-referrer. - Block use of customer accounts until the identifier is verified.
- On claim, reset and MFA enrolment, end other sessions, cancel pending changes and review linked identifiers.
- Never merge federated and local accounts on email match alone; check
email_verified. - Replace admin-set temporary passwords with one-time passes that lead to passkey or MFA registration.
- Restrict help desk resends to the identifier on record and log every override.
- Disable or delete accounts not claimed within policy, and report on them monthly.
- Test the five pre-hijacking classes before every major change to sign-up or sign-in.
Standards and references
- NIST: SP 800-63B-4 Digital Identity Guidelines, Authentication and Authenticator Management
- USENIX: Pre-hijacked Accounts, An Empirical Study of Security Failures in User Account Creation on the Web
- OWASP: Application Security Verification Standard 5.0
- OWASP: Forgot Password Cheat Sheet
- Microsoft Learn: Configure a Temporary Access Pass
- MITRE ATT&CK: T1078 Valid Accounts
Related NHI Mgmt Group resources: Account Recovery and Help Desk Security Guide · Customer IAM (CIAM) Guide · Account Enumeration Prevention Guide · Magic Links and Email OTP Security Guide