Testing plays a critical role in Salesforce development and project delivery. However, navigating different user roles and permission sets can be complex, making it difficult to accurately simulate real user experiences. As a result, the Login As User feature is essential for verifying user permissions and effectively troubleshooting issues.
But you may find it frustrating that Salesforce automatically logs you out after ending a Login As session. Your original admin session is also terminated, forcing you to log in again as a system administrator. Fortunately, there is a setting you can change to avoid this behavior.
Follow the steps below:
- Click on Setup, go to Session Settings
- Disable Force relogin after Login-As-User
- Click on Save.

Now you can test login-as other users easily and efficiently!