Sub topic 5
Registering a verification method
Enabling MFA does not protect anyone until each user has registered at least one verification method. This chapter covers what registration involves, how users do it, how you can see who has not done it, and the errors that come up most often.
This chapter assumes you know how to assign permission sets, how to find Setup pages, and which verification methods Salesforce supports (covered in "Choosing verification methods"). It also assumes MFA is already turned on for your users (covered in "Enabling MFA for your users").
What registration means
Registration is the step where a user links a verification method to their Salesforce account. After that, Salesforce can ask for it at login. Until it is done, the user has no second factor to present.
Registration produces a record that ties a method to a user. Salesforce stores one record for each registered method, and a user can have several. This matters later, because the number of registered methods decides how well a user can recover from a lost device.
Registration happens at the first login after MFA is enforced for that user. Salesforce does not let the user continue into the org until a method is connected. A user who is already logged in when you enable MFA is prompted at their next login.
The registration flow
The steps depend on the method, but the overall flow is the same.
- The user enters their username and password.
- Salesforce detects that MFA applies and that no method is registered.
- Salesforce prompts the user to choose and connect a method.
- The user completes the method-specific setup.
- Salesforce asks the user to prove the method works, usually by entering a code or approving a request.
- The login completes and the method is saved to the account.
The proof step is important. A method is only saved once the user shows it can produce a valid response, so a typing mistake while scanning a code does not leave the account in a half-registered state.
Registering each method type
Salesforce Authenticator
The user installs the Salesforce Authenticator app on a phone. Salesforce shows a two-word phrase on screen. The user enters that phrase in the app, which connects the account. After that, each login sends a push notification that the user approves or denies. The app also shows the location of the login request, so the user can spot a request they did not start.
TOTP authenticator apps
A time-based one-time password (TOTP) app generates a six-digit code that changes every 30 seconds. Salesforce shows a QR code. The user scans it with the app, which stores a shared secret. The user then types the current code to confirm.
Two points cause most problems here:
- The phone clock must be accurate. TOTP codes are calculated from the current time, so a phone that is a minute or two off produces codes that Salesforce rejects.
- Any standards-based TOTP app works, such as Google Authenticator, Microsoft Authenticator, or Authy.
Security keys
A security key is a physical device that supports the WebAuthn or U2F standard. The user inserts the key, or taps it for NFC and Bluetooth models, when Salesforce asks. They are asked to touch the key to confirm they are present. Security keys are resistant to phishing because the key checks which website is asking, so a fake login page cannot get a valid response.
Built-in authenticators
Built-in authenticators use the device the user is already on, such as Touch ID, Face ID, or Windows Hello. The user sets this up from the browser on the device. The credential stays on that device, so it only works there. Users who sign in from several computers need to register on each one or add a second method.
Registering outside the login prompt
Users do not have to wait for a prompt. They can connect or change methods themselves from their personal settings.
- Click the profile picture, then choose Settings.
- Open Advanced User Details, or search for "Advanced User Details" in the settings search box.
- Find App Registration: Salesforce Authenticator or App Registration: One-Time Password Authenticator, and select Connect.
- Complete the setup, then confirm with a code.
Users can also add a second method here. Encourage this. A user with one phone-based method and one backup, such as a security key, can recover from a lost phone without calling the help desk.
Administrators can also remove a user's registered methods. This is the reset action covered in "Helping users who lose a verification method".
Checking who has registered
You can query registration data with SOQL. Salesforce exposes a TwoFactorInfo object that holds a record for each user who has registered a verification method. The query below finds active users who have no record there.
SELECT Id, Name, Username
FROM User
WHERE IsActive = true
AND Id NOT IN (SELECT UserId FROM TwoFactorInfo)The result is a to-do list. These users are still active, but they have not registered a method. If MFA is enforced for them, they will be prompted at their next login. If it is not yet enforced, they are the people your rollout still needs to reach.
To confirm that registered users are actually completing MFA at login, check the login history. This query shows the last seven days of logins with their source and status.
SELECT UserId, LoginTime, LoginType, SourceIp, Status, Application
FROM LoginHistory
WHERE LoginTime = LAST_N_DAYS:7
ORDER BY LoginTime DESC
LIMIT 200A user who keeps appearing with failed statuses right after you enforce MFA is often stuck in registration. The next section lists the likely causes.
Common registration errors
| Symptom | Likely cause | What to do |
|---|---|---|
| TOTP code is rejected every time | Phone clock is out of sync | Turn on automatic time in the phone settings, then retry |
| QR code cannot be scanned | Screen glare, small window, or a blocked camera | Use the manual entry key shown beside the QR code |
| Salesforce Authenticator never shows the request | Notifications are disabled, or the phone is offline | Allow notifications for the app and check the connection |
| Security key is not detected | Browser does not support the standard, or the key is plugged into a hub | Use a current browser and a direct port |
| Built-in authenticator is not offered | Device has no biometric or PIN set up | Set up Touch ID, Face ID, or Windows Hello first |
| User is stuck in a registration loop | Session cookies are blocked, or the page was refreshed mid-setup | Clear cookies for the org domain and start again |
| User registers but is asked again next login | Registration was never confirmed with a code | Repeat setup and finish the proof step |
Edge cases to plan for
- Shared or generic accounts. A shared account cannot meaningfully use a personal phone method. Avoid shared user accounts. If one exists for a legitimate reason, such as a kiosk, register a method held by a named owner and document who has it.
- Users without smartphones. Some staff cannot use phone apps. A security key or a built-in authenticator on a managed computer is a workable alternative.
- Multiple orgs and sandboxes. Registration is tied to the user record in a specific org. A user with accounts in production and a sandbox registers separately in each, and the sandbox may have a different username.
- New hires. Include registration in onboarding. A new user's first login should be done with the method ready, ideally with the helper present or a guide available.
- Users who change phones. Moving to a new phone does not move the registration. The user should add the new phone as a method before returning the old one, if the old one still works.
A practical registration checklist
- Confirm MFA is enabled for the target group.
- Tell users in advance which methods are accepted and when enforcement starts.
- Ask each user to register two methods where possible.
- Run the
TwoFactorInfoquery daily during the rollout. - Contact users who remain on the list.
- Review failed logins in login history to find people stuck in setup.
Exercise
An administrator runs the TwoFactorInfo query and finds 40 active users with no registered method. Name two reasons a user might appear in the list even though nothing is wrong with the user's account, and one action that confirms which reason applies.
Show answer
The user may not be in a group where MFA is enforced yet (for example, the permission set has not been assigned, or they are in a later rollout wave), or the user may simply not have logged in since enforcement began and so has not been prompted. To confirm, check the user's permission set assignments and look at the user's last login time in LoginHistory. If the user has no login since enforcement started, they will be prompted at the next login.
Exercise
A user reports that the six-digit code from their TOTP app is rejected during registration, though the app shows codes normally. What is the most likely cause, and how do you fix it?
Show answer
The phone clock is out of sync with the actual time. TOTP codes depend on the current time, so a clock that is off by more than a short window produces codes Salesforce rejects. Turn on automatic date and time on the phone, then restart registration and enter a fresh code.
Exercise
Why should users register a second method, and which pairing would you suggest for someone who mainly uses a phone?
Show answer
A second method lets the user recover from a lost or broken device without help from an administrator. For a phone-based primary method, such as Salesforce Authenticator, a security key kept in a safe place is a good backup, because it does not depend on the phone.