Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
6
votes
2 answers
Impersonating ASP.NET claims identity to windows identity
I have an ASP.NET application which uses claims bases authentication against ADFS. I also map it to a WindowsClaimsIdentity by using the Claims to Windows Identity Service. That works fine.
But now I need to impersonate the current request/thread so…

Jaap
- 2,252
- 2
- 20
- 24
6
votes
1 answer
Getting the default credentials?
I have page A.aspx in my domain
this page (in its c# codes) makes a request to another page.(B.aspx). - which is in my domain also
the whole site is in windows authentication
HttpWebRequest loHttp =…

Royi Namir
- 144,742
- 138
- 468
- 792
6
votes
2 answers
Starting remote Windows services with ServiceController and impersonation
I have a .NET MVC3 application that needs to be able to turn a remote service on and off. In order to do this I am impersonating a specific user account via WindowsIdentity.Impersonate(). To test the user's permissions I can log in as the user and…

David Brainer
- 6,223
- 3
- 18
- 16
6
votes
1 answer
Windows Impersonation and duplicating tokens
I have an asp.net project where the request will delegate work to the background (via quartz.net). The web application is using windows authentication and impersonation.
I would also like to impersonate the current user on the background thread as…

Jason Meckley
- 7,589
- 1
- 24
- 45
6
votes
5 answers
Under UAC, why can't I write a file as an impersonated user?
I'm impersonating a user until Windows 2008 with UAC enabled. I'm trying to write some files to a temp directory. But even if a user has write access to a directory, when I impersonate that user, I'm unable to write to that directory (I get an…

Ron Romero
- 9,211
- 8
- 43
- 64
6
votes
1 answer
Programmatically access to TFS 2010 from outside the domain
I'm trying to access my TFS server programmatically from outside the domain where the server is installed. A basic test program would look like this :
class Program
{
static void Main(string[] args)
{
Uri tfsUri = new…

Matthieu
- 4,605
- 4
- 40
- 60
6
votes
1 answer
Is it fatal if RevertToSelf() after ImpersonateSelf() fails?
MSDN says that if RevertToSelf() fails the program should terminate immediately, because otherwise it continues to run in the name of the client being impersonated and that is inappropriate. Now suppose I do
ImpersonateSelf( SecurityImpersonation…

sharptooth
- 167,383
- 100
- 513
- 979
6
votes
1 answer
Impersonation throws FileNotFoundException with WindowsIdentity in Powershell
I am encountering a somewhat weird error with performing impersonation in PowerShell and C#. Executing the folowing code does not show any errors.
PSObject result = null;
using (PowerShell powershell = PowerShell.Create())
{
…

Jae
- 105
- 5
6
votes
2 answers
How can I impersonate a user across un-trusted domains?
Machine A and Machine B are in different domains. Machine A uses a VPN to gain access to Machine B's network.
I am trying to impersonate a user for the purpose of using Microsoft.Web.Adminstration to do some administrationy things in IIS on Machine…

BVernon
- 3,205
- 5
- 28
- 64
6
votes
0 answers
Kerberos impersonation of a Spark Context at runtime
I have a Spark application executing various jobs for different users simultaneously, via several Spark sessions on several threads.
My customer would like to kerberize his hadoop cluster. I wonder if there is a way to configure impersonation such…

mathieu
- 2,330
- 2
- 24
- 44
6
votes
2 answers
ADFS authentication and impersonation from a Java (Spring MVC under Jetty) application
I have a Java web app which provides a search service, and in some cases needs to check security for results. If it matters, it's implemented in Spring MVC and running under jetty.
I have a customer who would like the web app's authentication…

Matt Sheppard
- 116,545
- 46
- 111
- 131
6
votes
2 answers
use Process.Start while Impersonating (Window Application)
I'm trying to use Process.Start() under Impersonation, i have google for few days, most answer i come across was under ASP.net, but I'm developing for Window Application, so I'm having difficulty to find the root cause.
This is my impersonate code…

ragk
- 75
- 1
- 9
6
votes
1 answer
An error occurred loading a configuration file: Failed to start monitoring changes to '\\share'
I had this same problem last week, which resolved itself after I enabled impersonation. Now, I've moved this box to a different location and am now receiving it again. However, this time it is much less descriptive. The only error I'm receiving…

Jason N. Gaylord
- 7,910
- 15
- 56
- 95
6
votes
1 answer
Impersonate SYSTEM (or equivalent) from Administrator Account
This question is a follow up and continuation of this question about a Privilege problem I'm dealing with currently.
Problem Summary:
I'm running a program under a Domain Administrator account that does not have Debug programs (SeDebugPrivilege)…

KevenK
- 2,975
- 3
- 26
- 33
6
votes
5 answers
How to Impersonate a user in managed code?
Given a username and password how do i impersonate that user and run some code as that user.
And by managed i mean without pinvokes or dllimports

Simon
- 33,714
- 21
- 133
- 202