I recently got an order from my manager to turn on two-factor authentication on all our databases, so I have enabled "Two-Factor Authentication for User Interface Logins" and assigned the permission set to all Salesforce users.

Now my users are complaining that they have to generate and enter a code EVERY time they login.

Are there better options than the default Salesforce two-factor permission set? Is there a way to secure my company's data in a more efficient way without further development?

1 Answer 1


There's two main ways to use 2FA. The first is where you enter a code each time you log in, and the second is where you authenticate the login through a mobile app. If you install the Salesforce Authenticator, and connect it to your login for 2FA, you can then log in simply by pressing a button on your phone after entering your password. Additionally, during the login process, you can use "Remember Location", which will cause the app to automatically authenticate the login request when the mobile device is within a certain GPS area (e.g. your office).

See the Android or iTunes app for details on how it works, as well as the Administrator's Guide for configuring 2FA.

Here's a screen cap of me using automatic login on my security trailhead dev org.

Automatic 2FA Login With Authenticator

  • Is there a way to require a second authentication factor ONLY when the IP address is outside of the whitelisted range? The Configure Two-Factor Authentication section of the Salesforce Security Guide makes it sound like you need to go through dozens of steps to configure a custom flow for this, but that seems crazy to me. Was hoping it would be a single-step sort of configuration? Commented Jul 19, 2019 at 23:41
  • @BrentBow It is my understanding that you do need a Login Flow in order to require 2FA depending on IP address. However, it might be worth asking a full question to see if someone else from the community knows of an alternative.
    – sfdcfox
    Commented Jul 20, 2019 at 0:47
  • was on the fence Re: whether this was a significantly different question, but I'll take your experienced advice and post one. Thanks Commented Jul 22, 2019 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .