Sub topic 4
Enabling MFA for Your Users
This chapter covers how to turn on multi-factor authentication (MFA) for the users in your org. It assumes you already know the basics of users, profiles, and permission sets. It also assumes you have read the earlier chapters on what MFA is and which verification methods Salesforce supports. Registering a method is covered in the next chapter, so here the focus is on the admin side: choosing how to enable MFA, applying it, and confirming it works.
What "enabling MFA" means
Enabling MFA does not give users a code or a device. It changes the login rule for them. After the change, a user who signs in with a username and password must also prove a second factor before Salesforce lets them in. If the user has not registered a verification method yet, Salesforce prompts them to connect one at their next login.
Salesforce gives you two ways to apply the requirement to direct logins (logins that use a Salesforce username and password):
| Approach | Where you set it | Scope | Best for |
|---|---|---|---|
| Permission set or permission set group | The "Multi-Factor Authentication for User Interface Logins" user permission | Only the users assigned | Phased rollouts, pilot groups |
| Profile | The same permission, under System Permissions on the profile | Everyone with that profile | Org-wide enforcement by user type |
Both settings use the same permission. The difference is how you assign it.
Prerequisites in your org
Check these before you change anything:
- You have the "Customize Application" and "Manage Users" permissions, or equivalent admin rights.
- You know which users sign in directly and which sign in through single sign-on (SSO). The permission described here applies to direct logins. SSO is covered in a later chapter.
- At least two admins can reach Setup, so a mistake does not lock out everyone.
- Your users have a way to receive or generate a second factor, such as a phone with an authenticator app or a security key.
Enable MFA with a permission set
A permission set is the safest starting point because you can add and remove users without touching profiles.
- In Setup, enter "Permission Sets" in Quick Find and select Permission Sets.
- Click New. Enter a label such as
MFA Requiredand save. - Open the new permission set and click System Permissions.
- Click Edit, then select Multi-Factor Authentication for User Interface Logins.
- Save.
- Click Manage Assignments, then Add Assignments, and choose the users.
For many users, create a permission set group, add the permission set to it, and assign the group instead. This keeps the setup tidy as the number of users grows.
Enable MFA with a profile
If you want every user of a profile to be covered, set the permission on the profile.
- In Setup, enter "Profiles" in Quick Find and select Profiles.
- Open the profile and click Edit (or use the enhanced profile user interface and open System Permissions).
- Select Multi-Factor Authentication for User Interface Logins.
- Save.
A profile change takes effect for all users with that profile at their next login. For a large profile this can generate a spike in help desk requests. Pilot first.
Which approach should you choose?
The decision depends on how fast you need to move and how much control you want.
- Use a permission set when you want a pilot group, a department-by-department rollout, or an easy way to back out.
- Use a profile when the whole population of that profile is ready and you want new users to be covered automatically.
- Combine them: pilot with a permission set, then move the permission to profiles once the rollout is stable.
Permissions are additive. If a user's profile has the permission, removing it from a permission set does not turn MFA off for them. To release a user from MFA, you must remove every source of the permission.
What the user sees
Once the permission applies, the login sequence changes.
The first login after the change is the one that triggers registration. Tell your users in advance, so the prompt is not a surprise that looks like a phishing attempt.
Related settings that affect MFA
Several other settings change how often users see the MFA prompt. Review them before launch.
- Session security level. Some features and apps require a High Assurance session. If a user signs in with a lower assurance level, Salesforce can ask them to verify again. Session settings are covered in a later chapter.
- Lightning Login and passwordless options. If you allow passwordless login, the verification method itself acts as the strong factor. Check your login policies so users do not end up with conflicting experiences.
- Trusted IP ranges. Logins from a trusted IP range can skip the identity confirmation step that applies to unknown networks. This is separate from MFA. It does not let a user skip a required MFA challenge.
- Login flows. A login flow can add steps after authentication. If you also use MFA, test that the two work together.
Edge cases and common errors
Users sign in but never see a prompt
The permission is probably not applied to them. Check these:
- The user is not assigned the permission set, or the permission set does not include the permission.
- The user signs in through SSO, so the direct-login permission is not the control that applies. The identity provider must perform MFA, or you must configure Salesforce to require it for SSO logins.
- The user is on an old session. MFA is evaluated at login, so an existing session is not interrupted.
Users are asked for MFA too often
Look at session timeout settings, the session security level, and whether users clear cookies or use private browsing windows. A browser that does not keep its session cookie looks like a new device every time.
An integration breaks after the change
API logins and integration users behave differently from interactive users. Do not assign the user interface MFA permission to an integration user that signs in with a stored password. The API chapter explains the right options. As a precaution, keep integration users in their own profile, separate from the one you use for people.
An admin is locked out
This is the most serious error. Make sure at least one admin has a registered method before you enforce the requirement broadly, and that a second admin is available. Keep the recovery steps written down.
Mixed populations
Contractors, community users, and employees often have different login paths. Group your users by how they sign in before you design permission sets. A single permission set for everyone is rarely correct.
Verifying your work
After you assign the permission, confirm that it works.
- Sign in as a test user in a private browser window and check that you are asked to register or verify.
- Open Setup, then Users, and open the user record. Check their assigned permission sets and profile.
- Review login records for the pilot users to see whether logins succeed.
You can also find users in your org who still have no registered verification method. This query lists active users with no record in TwoFactorInfo:
SELECT Id, Name, Username
FROM User
WHERE IsActive = true
AND Id NOT IN (SELECT UserId FROM TwoFactorInfo)Run it in the Developer Console Query Editor or in Salesforce Inspector. Treat the result as a follow-up list. These users either have not logged in since the change, or have not finished registration. A user who is not in scope for MFA will also appear here, so cross-check against your permission set assignments.
To review how pilot users are signing in, query the login history:
SELECT UserId, LoginTime, LoginType, SourceIp, Status, Application
FROM LoginHistory
WHERE LoginTime = LAST_N_DAYS:7
ORDER BY LoginTime DESC
LIMIT 200Look for a rise in failed logins right after the change. A small bump is normal while users learn the process. A sustained rise points to a configuration problem or to confusion about the prompt.
A suggested enablement order
- Create the permission set and assign it to the admin team. Test everything.
- Extend it to a small pilot group from one department.
- Send a short instruction message before each wave, including what the prompt looks like and where to get help.
- Check login history and the unregistered-user query after each wave.
- When the pilot is stable, move to profiles or permission set groups for the remaining users.
Summary
You enable MFA for direct logins by granting the "Multi-Factor Authentication for User Interface Logins" permission, through a permission set or a profile. Permission sets give you control and an easy rollback. Profiles give you broad coverage. The change takes effect at the next login and prompts unregistered users to connect a method. Check the cases that behave differently: SSO users, integration users, and admins who might get locked out. Then confirm the result with test logins and queries.
Exercise
Your org has 800 users on one profile. You want to start MFA with 40 users in the finance team, and you want to be able to remove the requirement for any of them quickly. Which approach do you use, and why shouldn't you add the permission to the profile first?
Show answer
Create a permission set that includes "Multi-Factor Authentication for User Interface Logins" and assign it to the 40 finance users, or put it in a permission set group. A permission set applies only to the assigned users and can be removed per user. Adding the permission to the profile would apply MFA to all 800 users at their next login, with no way to limit the pilot. It would also create a large registration and help desk load at once.
Exercise
A user who has the MFA permission through a permission set says they never get a prompt. They sign in through the company's SSO portal. What is the likely cause, and what should you check?
Show answer
The permission governs direct logins with a Salesforce username and password. An SSO login is authenticated by the identity provider, so the Salesforce prompt does not appear. Check whether the identity provider enforces MFA, and whether the org is configured to require MFA for SSO logins. Also confirm the user does not have a long-lived session that predates the change.
Exercise
You remove the MFA permission set from a user, but the user is still asked for a second factor. Give one reason.
Show answer
Another source still grants the permission, such as the user's profile or a permission set group. Permissions are additive, so you must remove every source to release the user from MFA.