> Markdown version of [Impersonate Users](https://vaadin.com/docs/next/tools/copilot/features/impersonate-users). Section index: [llms.txt](https://vaadin.com/docs/next/tools/llms.txt)

# Impersonate Users

In an application with a login, see it as any of its users: switch to a user by name, without a password. It’s good for checking what each role may see and do, such as which views are in the menu.

Sign in as a user, then switch to an admin

1. On the login page, open the **⋮** menu at the end of the toolbar and choose **Impersonate App User**. Type a username in the panel.

   [![Your browser does not support the video tag.](../../../vaadin/videos/copilot/impersonate-users/01-open.jpg)](../../../vaadin/videos/copilot/impersonate-users/01-open.mp4)

2. Click **Switch User**. The page reloads with you signed in as that user, without a password: the menu lists the views that a user may open.

   [![Your browser does not support the video tag.](../../../vaadin/videos/copilot/impersonate-users/02-in.jpg)](../../../vaadin/videos/copilot/impersonate-users/02-in.mp4)

3. Open the panel again: it lists the usernames you’ve used. Switch to an administrator, and the menu has the views for administrators too.

   [![Your browser does not support the video tag.](../../../vaadin/videos/copilot/impersonate-users/03-switch.jpg)](../../../vaadin/videos/copilot/impersonate-users/03-switch.mp4)

## <a id="what-it-needs"></a>What It Needs

Impersonation works in applications that use Spring Security, as set up in [Add Login](https://vaadin.com/docs/next/building-apps/security/add-login.md). Copilot looks the username up with your application’s `UserDetailsService`, and signs you in with that user’s roles. Without Spring Security, the panel says that it’s disabled.

Like the rest of Copilot, it’s only there in development mode.
