Skip to main content

SF-0188 · Scenario · Medium

How to login as portal user or impersonate portal user?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026

To log in as a community/portal user — for support or debugging — open the user’s record in Setup → Users, click the Login button next to their name. You’ll land in the community as that user. The button only appears when (a) your profile has Modify All Data or the Login Access Policies are configured to allow administrator logins, and (b) the user has granted login access (or the org policy auto-grants it). This is the supported impersonation flow and is far safer than asking the user for their password.

Step-by-step

  1. Setup → Users → Users.
  2. Find the community user (filter by their community license or by name).
  3. Click the Login link next to their name (Lightning Experience shows it in the row actions).
  4. You’re redirected to the community’s URL and authenticated as that user.
  5. Your browser tab now reflects that user’s session — visible records, navigation, sharing rules, FLS.
  6. Click Log out as in the header to return to your own session.

Prerequisites

Several gates must align:

  • Your profile must have Modify All Data or the org’s Administrators Can Log in as Any User setting must be on (Setup → Login Access Policies).
  • The community must be active. A deactivated community can’t be impersonated into.
  • The user must be active (IsActive = true).
  • Login access from the user — historically users had to “grant login access” with an expiration date. Modern orgs typically have the policy set to allow admin login at any time, removing this requirement.

Why impersonate

  • Troubleshooting access issues. “I can’t see this case” — log in as the user, see what they see.
  • UI bug reports. Reproducing a layout issue specific to that user’s profile and permission set.
  • Sharing rule debugging. Confirm that sharing rules and FLS render exactly as expected.

What you can and can’t do as the impersonated user

When logged in as the user, you operate within their sharing model — you can’t see records they can’t see. But:

  • Audit fields record actions as the impersonated user, not you.
  • Some sensitive actions (changing the user’s password, granting login access) are blocked by Salesforce as a safeguard.

Quick interview answer

“Open Setup → Users, find the community user, click the Login link next to their name. You’re redirected to the community as that user. You need Modify All Data or the org’s Login Access Policy must allow admin impersonation; the community and user must be active; and historically the user had to grant login access. Log out via Log Out As to return to your own session. Audit fields show the impersonated user, not you.”

Verified against: Salesforce Help — Log In as a Community User and Login Access Policies. Last reviewed 2026-05-17.