Questions tagged [impersonation]

Impersonation is a process whereby an application assumes another identity or security context during execution.

1522 questions
8
votes
1 answer

Impersonating users through NTLM

I have an internal application which has two levels of security. FormsAuthentication for client-facing application and NTLM Integrated authentication for management interface. I can easily impersonate clients by just creating the proper .ASPXAUTH…
Vasili Sviridov
  • 191
  • 2
  • 4
  • 14
8
votes
4 answers

Alternatives to LogonUser for network impersonation (C++)

Are there any alternatives to LogonUser and for impersonating given account in order to access network resources? I'm looking for the method of impersonation which would let me connect to machine in foreign domains (or, workgroup machines for the…
galets
  • 17,802
  • 19
  • 72
  • 101
8
votes
3 answers

SQL Server Execute Impersonation

What is the diffrence between... execute as user = 'testuser' AND execute as login = 'testuser' I am executing a cross database procedure under these logins and it works with the exececute as login but not the execute as user. It is saying the…
JBone
  • 3,163
  • 11
  • 36
  • 47
7
votes
3 answers

IIS7 Impersonation doesn't work to access TFS repository

I'm trying to build an ASP.NET page that adds a work item in TFS. I have enabled impersonation and Windows authentication: In the…
the_void
  • 5,512
  • 2
  • 28
  • 34
7
votes
3 answers

Impersonation and DirectoryEntry

I am impersonating a user account successfully, but I am not able to use the impersonated account to bind to AD and pull down a DirectoryEntry. The below code outputs: Before impersonation I am: DOMAIN\user After impersonation I am:…
Elijah W. Gagne
  • 2,801
  • 4
  • 31
  • 29
7
votes
1 answer

WTSGetActiveConsoleSessionId returning system session

I have this problem that happened once and I still don't know how to fix it. I have a windows service, when the service runs, it first need to impersonate the logged in user (active user) to load some paths and settings that are saved in the user's…
Zaid Amir
  • 4,727
  • 6
  • 52
  • 101
7
votes
2 answers

How can I use impersonation to manipulate files/directories on a remote machine with UNC?

I need to download files from a server to a shared drive directory, creating the directory if it doesn't exist. There are a few things making this more complicated: I do not have write access (nor does the account that will run the job in UAT/Prod)…
Devsman
  • 434
  • 4
  • 17
7
votes
0 answers

Identity Server 4 User Impersonation

I am struggling to implement a Impersonation feature into the Identity Server 4 Service. I understand that there's a lot of people who are against implementing it the way I want to but I really need the full redirect back to the SSO server in order…
7
votes
3 answers

.NET Core 2.1 Web API Impersonation causes WSALookupServiceEnd while processing error

I'm trying to do impersonation in a .NET Core 2.1 Web-API. So this Web-API calls another Web-API using HttpClient and I need the user that called the first one to also be the one who is executing the second one. The same scenario does work from…
Beachovic
  • 81
  • 4
7
votes
2 answers

Get impersonated user name

I have a class that needs to know name of a user currently in effect. Environment.UserName or WindowsIdentity.GetCurrent().Name is for that. But when impersonation is enabled, they return LocalUser name not the ImpersonatedUser name. How to get name…
zzandy
  • 2,263
  • 1
  • 23
  • 43
7
votes
2 answers

Web Applications: Allowing super users to impersonate other users - Is there a design pattern for this?

In my web application, I'd like to allow super users to impersonate other users. My Question: Is there a generally accepted design pattern that I could use to make this happen? Generally speaking, I can imagine that I'll need to keep track of…
7
votes
4 answers

Run new process as different user in vb.net

I'm currently using a homegrown method to run a process as a different user in Vista, and I can't escape the feeling that's it hack-ish and less than ideal (in addition to the fact that it craps out UAC, crashing my app with a security exception,…
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
7
votes
2 answers

core 2.0 - best way to impersonate a Windows user?

With .NET web apps, I am able to impersonate a Windows user easily enough using this class: /// /// TOOLS IMPERSONATION /// namespace Tools { #region Using directives. //…
R. StackUser
  • 2,005
  • 4
  • 17
  • 24
7
votes
1 answer

ASP.NET Core Identity impersonate specific user

Let's say I have the following roles: Admin User I want Admin role to impersonate specific user account with User role, but without knowing that specific user account's password. Admin should be able to impersonate any user from the application…
7
votes
2 answers

Passthrough (impersonation) authentication with ASP.NET and TFS api

I'm trying to enable passthrough or impersonation authentication inside an ASP.NET website that uses the TFS2010 API. I've got this working correctly with Cassini, however with IIS 7.5 (Windows 7) something is going wrong. I found this blog post on…
Chris S
  • 64,770
  • 52
  • 221
  • 239