"Log in as user" for support staff: designing it safely
Short answer: A "log in as user" button saves support staff a lot of time, because they can see exactly what a customer sees. Built carelessly, it's also a perfect tool for misuse. Design it so staff act on the customer's behalf without becoming indistinguishable from them: limit who can use it, record a reason, show a clear banner, block sensitive actions, end sessions automatically, and log every action under both the staff member and the customer.
Why SaaS teams want it
A customer reports that their dashboard shows the wrong totals, or a setting won't save, or an invoice looks odd. Screenshots and descriptions only go so far. Seeing the account as the customer sees it usually finds the problem in minutes. For a small Canadian software company with a handful of support staff, that's a real advantage.
The risk is equally real. Anyone who can impersonate a user can read their data and, unless you stop them, change it. A compromised support account becomes access to every customer.
Impersonation versus acting on behalf
It helps to borrow precise language from the OAuth Token Exchange standard, RFC 8693, which deals with exactly this distinction in a different setting.
- Impersonation. The RFC describes it as one party being given all the rights of another and being indistinguishable from them in that context. Anyone receiving the token believes they're dealing with the customer.
- Delegation. The acting party keeps its own identity, and it's explicitly understood that actions are taken by A representing B.
For support access, aim for the delegation model even if you call the feature "impersonation". The system should always know a staff member is involved, record it, and treat that session differently. RFC 8693 even defines an act (actor) claim for tokens so the acting party's identity travels with the token. If your app uses tokens, a similar field in your session is a natural way to carry "who is really behind this request".
Design rules that keep it safe
1. Restrict who can use it. Give the permission to named support roles, not every admin. Require multi-factor login for those staff accounts.
2. Ask for a reason. Before starting, staff enter a short reason, ideally linked to a ticket number. It makes misuse awkward and auditing easy.
3. Consider customer consent. Some products ask the customer to grant temporary access ("Allow support to view my account for 24 hours"). For business customers with sensitive data, this is often expected. Decide which model fits your product and say so in your support documentation.
4. Show a banner the whole time. A prominent, unmissable bar at the top: "You are viewing Acme Ltd as Jordan (support). Exit." It prevents staff from forgetting and accidentally changing things.
5. Block or confirm sensitive actions. While acting as a customer, staff shouldn't be able to:
- Change the customer's password, email address or MFA settings.
- View or export full payment details.
- Delete the account or large amounts of data.
- Create API keys or change integrations.
- Send messages to the customer's own clients in their name.
Some teams make the session read-only by default and require a second approval for write access.
6. Time-limit sessions. End the support session automatically after a short period, and when the staff member logs out of their own account.
7. Keep sessions separate. Don't simply log the staff member in with the customer's session. Create a distinct support session that references both identities, so ending it doesn't sign the customer out and the customer's own session is never shared.
Logging every action
The OWASP Logging Cheat Sheet says application logs must record when, where, who and what for each event, and lists among the events worth logging the use of administrative privileges or access by application administrators, including all actions by those users.
For support sessions, that means:
- Session start and end, with staff member, customer, reason and time.
- Every action during the session, recorded with both identities: "performed by support user 12 on behalf of customer 340".
- Attempts to use blocked actions.
- A way to review logs, so a team lead can spot unusual patterns, such as one staff member opening many accounts without tickets.
Make sure records created during the session, such as notes or setting changes, show both identities in the customer-facing history too. "Changed by Support (Jordan) on your behalf" is far better than a change that appears to come from the customer.
Telling the customer
Being open builds trust:
- Mention in your privacy notice and support documentation that staff may access accounts to resolve issues.
- Show customers a log of support access in their account settings.
- Optionally notify them by email when a session starts.
Testing the feature
Before releasing it, test as an attacker would:
- Can a non-support user reach the impersonation endpoint directly?
- Does the banner appear on every page, including error pages?
- Are blocked actions blocked on the server, not just hidden in the interface?
- Do sessions really expire?
- Do logs show both identities for every write?
A worked example
A hypothetical Vancouver scheduling software company lets any admin click "Log in as" and lands them in the customer's own session with no banner. A support agent once changed a customer's notification settings believing they were in a test account. The team rebuilds the feature: only the support role can start a session, a ticket number is required, a red banner shows throughout, sessions are read-only unless a lead approves edits, and they end after 30 minutes. Every action is logged with both identities and shown in the customer's activity log.
FAQ
Is screen sharing a better option?
It avoids staff access entirely and suits some cases. It's slower and needs the customer present, so many teams offer both.
Should support see passwords or payment details?
No. Design the feature so neither is ever shown, even while acting as the customer.
Do I need a separate admin app for this?
Not necessarily, but keeping support tools on a separate, more restricted area of your system reduces risk.
What about enterprise customers who forbid access?
Offer a setting that disables support access for their account, and respect it in your code.
If you're planning a "log in as user" feature for your support team, tell us how your app handles sessions today.