Sub topic 3
Restricting Logins by IP Range and Login Hours
Assume you know Salesforce users, profiles, permission sets, and Setup navigation. The controls in this chapter supplement MFA. They do not replace it.
Restricting logins by IP range and login hours
A profile’s Login IP Ranges allow login only from specified addresses. Login Hours define when users may start a session. Use both controls for sensitive groups, but account for remote work, VPNs, and changing addresses.
Trusted IP ranges have a different purpose. They identify networks where Salesforce can reduce identity-verification challenges. They are not the same as profile login IP ranges, and they should not be treated as a complete access restriction.
Helping users who lose a verification method
Verify the user’s identity through your support process. Freeze the account temporarily if compromise is possible. An administrator can reset the user’s MFA registration, after which the user registers a new authenticator or security key. Never request a user’s one-time code. Maintain a documented emergency administrator path and test it before rollout.
Reviewing login history
Review Login History for failed attempts, unusual source IPs, and unexpected applications. For example:
SELECT UserId, LoginTime, LoginType, SourceIp, Status, Application
FROM LoginHistory
WHERE LoginTime = LAST_N_DAYS:7
ORDER BY LoginTime DESC
LIMIT 200Compare suspicious entries with the user’s normal location and work pattern. Combine this review with Event Monitoring when you need deeper session detail.
MFA, API logins, and integrations
Interactive API tools may prompt for MFA, but noninteractive integrations usually use OAuth, certificates, or another token flow. Give each integration a dedicated user with least-privilege permissions. Apply connected-app policies and protect secrets. Do not share a human administrator account with an integration.
Customizing the login process with login flows
Login flows can run custom checks or collect information after authentication. Use them for terms, device registration, or risk-based routing. Keep the flow short, test failure paths, and avoid treating it as a substitute for Salesforce MFA.
Planning a rollout and tracking adoption
Pilot with administrators and a small business group. Publish registration and recovery steps, then expand in stages. Track active users with a registered verification method, failed logins, recovery requests, and integration errors. Review these measures after each stage and adjust support capacity.
Exercise
A remote user is blocked by a profile Login IP Range. Should you disable MFA?
Show answer
No. Review the approved VPN or address range, update the restriction carefully, and keep MFA enabled.