Sub topic 2
What MFA Is and Why Salesforce Requires It
This chapter assumes you can navigate Setup, know what profiles and permission sets are, and understand usernames and passwords as login credentials. It builds the working model you need before you enable MFA in later chapters.
What MFA means
Multi-factor authentication (MFA) asks a user to prove their identity with two or more independent kinds of evidence. The kinds are called factors:
- Something you know, such as a password.
- Something you have, such as a phone running an authenticator app or a physical security key.
- Something you are, such as a fingerprint or face scan on a device.
A password alone is one factor. MFA adds at least one more from a different category. Two passwords do not count, because both are the same kind of evidence.
Why passwords alone are not enough
Attackers rarely break into accounts by guessing cleverly. They reuse credentials leaked from other sites (credential stuffing), trick users into typing passwords on fake pages (phishing), or try common passwords against many accounts (password spraying). Each of these works with only the password. If the login also needs a factor the attacker does not hold, a stolen password is not enough to get in.
The Salesforce MFA requirement
Salesforce requires MFA for all users who sign in to Salesforce products through the user interface. This requirement is part of the Salesforce contractual terms, so it applies to your org whether or not you have chosen to enable it. You can meet it in two ways:
- Turn on Salesforce's built-in MFA by enabling it for your users, covered in the chapter on enabling MFA.
- Use single sign-on (SSO) with your identity provider and enforce MFA there. The chapter on SSO covers this.
Either approach satisfies the requirement. What matters is that every interactive login involves a second factor.
Where MFA is checked
MFA applies to logins through the user interface, meaning a person signing in at a login page. Direct API logins by integrations are a separate case with their own rules, covered in a later chapter. Keep this distinction in mind, because a common mistake is to assume that enabling MFA for people also protects every integration user.
How a verification works
When MFA is on, Salesforce completes the usual password check first. It then asks for a second factor before it creates the session. The user responds with an approval, a code, or a tap on a security key. Only then does the session begin.
You can see which users have registered a verification method with a SOQL query against TwoFactorInfo:
SELECT Id, Name, Username
FROM User
WHERE IsActive = true
AND Id NOT IN (SELECT UserId FROM TwoFactorInfo)This lists active users with no registered verification method. These are the people who will be asked to register at their next login, or who may be blocked from finishing a login if you have required MFA.
Common mistakes
- Treating a long, complex password as a substitute for MFA. Strong passwords reduce guessing risk but do nothing against phishing or leaked credentials.
- Assuming SSO removes the requirement. With SSO, the identity provider must enforce MFA, or Salesforce must do it.
- Forgetting that shared or generic accounts also need a second factor.
- Enabling MFA without planning for lost devices. Recovery is covered in its own chapter.
Exercise
A company enforces strong passwords of 16 characters and requires a change every 90 days. A user's password is stolen through a phishing page. Does the strong password policy stop the attacker from logging in, and what would? Name the two ways an org can satisfy the Salesforce MFA requirement.
Show answer
The password policy does not stop the attacker, because the attacker has the valid password and the policy only affects its strength and age. A second factor the attacker does not hold, such as an authenticator approval or a security key, would stop the login. The two ways to satisfy the requirement are enabling Salesforce's built-in MFA for users, or using single sign-on and enforcing MFA at the identity provider.