Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
5
votes
2 answers
TFS 2010 - Why am I getting "TF30063 You are not authorized to access.." error when impersonating?
I am attempting to create a bug in TFS2010 by impersonating a user but always get
"TF30063 You are not authorized to access.."
I first authenticate using a service account and then attempt to impersonate a separate user account. I can successfully…

Simon
- 6,062
- 13
- 60
- 97
5
votes
2 answers
How to set ASP.NET security impersonation
I am going through
http://www.codeassociate.com/caapi/html/T_CA_Common_Security_Impersonate.htm
I don't want to hard-code domain\username and password.
Is it possible to get the current Windows user credentials and pass it?

user415772
- 431
- 1
- 11
- 17
5
votes
2 answers
Logoff after logonuser on C#
I use advapi32.dll's logonuser method to access data over our network.
I know it change the thread's user to the information i give it, but i was wondering if there's a way to reverse it.
I want to access the data and then return to the local user…

Ben2307
- 1,003
- 3
- 17
- 31
5
votes
2 answers
Enabling Impersonation in IIS 7.5 via Powershell
I hope someone can help, I am trying to enable enable "ASP.Net Impersonation" under the Authenticatuin section in IIS7, I have enabled other sections using the following command:
Set-WebConfigurationProperty `
-filter…

Iain
- 6,392
- 2
- 30
- 50
5
votes
1 answer
Cannot impersonate GCP ServiceAccount even after granting "Service Account Token Creator" role
I have 2 ServiceAccounts in my Google Cloud Platform (GCP) Project
owner
executor
The owner ServiceAccount has 1 project-wide role attached to it:
"Owner" - for the project
The executor ServiceAccount has ONLY 2 specific roles attached to it (as…

Rakib
- 12,376
- 16
- 77
- 113
5
votes
1 answer
Impersonation and delegation (with SQL Server) in ASP.NET
I've written a simple ASP.NET application that works as a frontend for a simple MSSQL database. The application is accessible over the Internet.
There are two physical servers involved: a WS2008R2 Active Directory domain controller which is also…

Dai
- 141,631
- 28
- 261
- 374
5
votes
2 answers
Running NUnit integration tests with different credentials
I am running integration tests with C#, NUnit, and SQL Server 2008 r2 dev edition database. Setting up my fixture includes creating a new database and loading test data, so I need dbo privileges for that.
However, I want to run the tests themselves…

Arne Lund
- 2,366
- 3
- 26
- 39
5
votes
3 answers
ASP.NET impersonation problem (part 2)
This is a follow on to a previous post about being unable to impersonate a currently logged in Windows user. There were many good suggestions, but the previous thread was getting messy, so I am resetting with this post. Hopefully with the current…

John Livermore
- 30,235
- 44
- 126
- 216
5
votes
0 answers
Grant additional privilege to impersonating thread
My program, "UP", needs to be able to mount VHDX files from network locations. The difficulty is that any thread calling OpenVirtualDisk(...) upon a network location needs to have both SE_MANAGE_VOLUME_PRIVILEGE, which most of my users will not…

Keith Russell
- 560
- 4
- 12
5
votes
1 answer
Help understanding impersonation
Could somebody please help me understand the concept of 'impersonation'?
The way I understand it is that when impersonation occurs, code executes on behalf of some identity.
So, for a web page, as long as impersonation is disabled, the web page…

Rauland
- 2,944
- 5
- 34
- 44
5
votes
5 answers
how to write tests that impersonates different users?
My Winforms app set permissions based on the group membership found in the current process.
I just made a unit test in MSTEST.
I'd like to run it as other users so I can verify the expected behavior.
Here's what I'm kind of shooting for:
…

Aaron Anodide
- 16,906
- 15
- 62
- 121
5
votes
1 answer
"service cannot be activated because it requires asp net compatibility", but I need it for impersonation
I posted a question yesterday about how to enable impersonation using WCF services here: WCF service not impersonating specified user in config?
I enabled aspnetCompatibilityMode but when I update my service proxy, it says "the service cannot be…

Ryan Peters
- 7,608
- 8
- 41
- 57
5
votes
0 answers
WindowsIdentity.Impersonate throws ''Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))' after April 2018 (1803) update
Our installer app uses the following code to verify service account permissions:
try
{
using (svcIdentity.Impersonate())
{
using (SqlConnection conn = new SqlConnection(builder.ConnectionString)) // <<<
{
…

flip
- 1,271
- 14
- 28
5
votes
1 answer
Start-job results in "The background process reported an error with the following message: ."
I have a simple Powershell script (that's being run in a step in Octopus deploy) that I'm trying to run as another user. We need it for future steps (each application on our platform runs as its own user account, and I need to be able to run an…

Richiban
- 5,569
- 3
- 30
- 42
5
votes
1 answer
How to use WindowsIdentity.RunImpersonated(handle, action);
We are trying to use RunImpersonated(handle, action); to be able to perform a REST call from a webserver but we have a hard time doing so. Project i ASP.NET Core 2.0 MVC.
We have the following general method made to establish a imp. context on…

Michael Pauli
- 51
- 1
- 6