How to Programmatically Impersonate Users in SharePoint

There are times when developing custom web parts and other SharePoint solutions, you need to impersonate a user and view SharePoint from within their context.

Impersonating a user in SharePoint requires a few things:

  • the account that the web or console application users that has privileges to impersonate other users (typically this would be the system account)
  • specific users' user tokens

Read more