---
title: "Impersonation"
slug: "impersonation-1523427"
abstract: "Overview of impersonation, including how to impersonate a user."
---
# Impersonation

When impersonating a user, a new `IMClient` instance that acts on behalf of the specified user is returned.

To impersonate users, the user creating the initial `IMClient` needs to have the impersonation privilege. Only users in the `superuser` group have this privilege.

> [!note]
> The `client` variable in the following code examples refers to the `IMClient` instance. When using the Web SDK, the variable name can be chosen freely, but it is also called `client` at instantiation in the documentation.

To impersonate a user (for example, *Demo.User* ):

```shell
IMClient impersonationClient = await MClient.ImpersonateAsync("Demo.User");

```