Why Salesforce Logs You Out After “Login As User”- And How to Fix It Instantly
Salesforce’s automatic logout after using the "Login As User" feature is controlled by a session setting called "Force relogin after Login-As-User." When enabled, it forces a full logout after exiting the user session, disrupting admin workflows. By disabling this option in Session Settings, admins can stay logged in and easily return to their admin session after testing, saving time and boosting productivity. This tweak is especially helpful for admins troubleshooting or testing permissions across multiple users. It improves efficiency without compromising security when managed appropriately.
- Disable "Force relogin after Login-As-User" in Session Settings to stay logged in after user testing.
- Logging out from Login As User returns you to the admin session without re-login.
- This setting improves productivity for admins troubleshooting and testing multiple users.
- The default forced logout exists for security reasons but can disrupt admin workflows.
- Adjust this session setting to streamline Salesforce administration and troubleshooting.
Have you ever faced this situation in Salesforce? You Login As a User, perform your testing, click Logout … and suddenly you’re logged out of Salesforce completely. Instead of returning to your Admin session , Salesforce redirects you straight to the login page. If this sounds familiar, don’t worry – this behavior is completely expected and is controlled by a single session setting in Salesforce. The Setting Behind the Issue This behavior is driven by a session configuration in Salesforce. Navigate to: Setup → Session Settings Look for the option: Force relogin after Login-As-User When this setting is enabled, Salesforce forces a full logout once you exit a Login As User session, instead of returning you to your original Admin login.