Impersonating with a client caller identity
When using Windows authentication for either the transport layer or the message layer, the client authenticated user identity will be associated with the corresponding service operation context as a
WindowsIdentity instance. The service operation can check the name and roles of the identity, and in some cases we can also make the service operation code execute under the client authenticated user identity, which is commonly called identity impersonation. This recipe will demonstrate how we can perform client identity impersonation in a WCF service operation that uses a Windows authentication type.
Impersonation is quite common in distributed applications or component services (like ASP.NET, ...