Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
2
votes
1 answer
Start exe from Windows Service using different credentials
I have a WCF service (exe) that I started via a console app using a different credential by passing the Domain, UserName and Password in the ProcessStartInfo() information. Using the code, the value for 'User name' in Task Manager for the 'exe' is…

liit
- 21
- 2
2
votes
4 answers
Powershell impersonation
How can I do an impersonation in PowerShell? I can use advapi32.dll LogonUser, but maybe there is a simpler solution?

alex2k8
- 42,496
- 57
- 170
- 221
2
votes
1 answer
Accessing SelfHosted WCF Services outside a domain
We have WCF services being self-hosted by a Windows Service inside our domain, using NetTCP with the following settings.
// Set Binding Security.
netTcpBinding.Security.Mode =…

kevin
- 45
- 5
2
votes
2 answers
keycloak impersonation via token-exchange does not work without roles info in the token
Our system uses a minimalistic token that does not include realm roles and client roles. Everything worked fine - after token validation we get all the information about user roles and groups from /userinfo. But recently we need to enable…

zo0M
- 972
- 11
- 20
2
votes
1 answer
impersonation and BackgroundWorker
I have a little bit of a problem when trying to use the BackgroundWorker class with impersonation. Following the answers from Google, I got this code to impersonate
public class MyImpersonation {
WindowsImpersonationContext…
Lucian D
2
votes
1 answer
Retrieving the login name in SQL Server via an Asp.NET application using Windows Authentication
Here is the scenario. The database server DBServer (SQL Server 2008) is on box 1 and the web server running an ASP.NET application is on box 2 (IIS 7.5).
The ASP.NET is using windows authentication so that all domain users are able to log in to the…

zs2020
- 53,766
- 29
- 154
- 219
2
votes
1 answer
Capturing output/error in PowerShell of process running as other user
This is a variation of a question that has been asked and answered before.
The variation lies in using UserName and Password to set up the System.Diagnostics.ProcessStartInfo object. In this case, we're not able to read the output and error streams…

malthe
- 1,237
- 13
- 25
2
votes
2 answers
VB.Net File.Copy/File.Move with different credentials
Ideally I'd like to be able to copy/move between an accessible folder on my local drive and a network share that I don't have permission to access (but the application would).
I am using impersonation to give me access to the files in the network…

user86257
- 33
- 1
- 4
2
votes
1 answer
Entity Framework and impersonation
I'm incorporating Entity Framework and ASP.NET Dynamic Data into an existing application that is setup to use impersonation="true" in the web.config, however the previous developers chose an approach where they revert back to the app pool identity…

manning18
- 957
- 3
- 8
- 18
2
votes
0 answers
.Net cross-platform user impersonation
I'm creating a .Net 6 console application which involves reading/writing files to user-specified file paths. Sometimes these file paths are on network shares which require separate credentials to be accessed with. If I was only worried about running…

deadlydog
- 22,611
- 14
- 112
- 118
2
votes
1 answer
What is difference between Auth::onceUsingID() and Auth::setUser() in Laravel-8
I want to implement Impersonate functionality into Laravel-8 without using any package.
Only super-admin can use this functionality.
I used laravel sanctum to authenticate.
to access impersonate functionality user should be super-admin.…

Dipesh C
- 41
- 6
2
votes
1 answer
Current User is LocalSystem Check?
It is easy enough to determine if the user running my C# .NET 4.0 console app is a member of the local Administrators group. I am also trying to determine if it is running under LocalSystem. What is the best way to do that?

Snowy
- 5,942
- 19
- 65
- 119
2
votes
2 answers
Keycloak Token Exchange refresh_token requested_token_type unsupported
I am using token_exchange to impersonate as another user in the same realm. This endpoint works fine for access_token retrieval. However since the access token will expire after sometime, I would like to also have refresh token so that I can…

Uma Ilango
- 968
- 4
- 16
- 31
2
votes
0 answers
Impersonate with IdentityServer, with having an actor claim for the impersonated user
Together with IdentityServer 4, we've successfully implemented impersonation.
Implementation details
From our MVC application there are ACR values provided as "Impersonate:" while connection the IdentityServer.
At our IdentityServer there is a…

Peter
- 743
- 5
- 26
2
votes
3 answers
Impersonation to Update user AD info in an ASP.NET Forms Authenticated Site
We have a Forms Authenticated intranet which querys AD for the login and stores a copy of the windows identity in the session in order to impersonate the user later when updating their AD entry. We can't use windows auth for impersonation (long…

Richard
- 21,728
- 13
- 62
- 101