Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
3
votes
1 answer
Impersonation for file copy across network
I want to copy a file from remote machine in the same domain. so I am using impersonation to do that.
I am using DLLImport of advapi32.dll and it properly impersonate the user.
Now when below code line executed i got the following…

Denish
- 983
- 1
- 13
- 20
3
votes
2 answers
How to find out if user has administrator privileges or not?
I have created a program in C# that allows you to change the background of the login screen of Windows 7.
The program has to create a new folder in the System32 folder, and also move a file there. I have no problem with this on my personal machines,…

Milkboat
- 179
- 1
- 6
3
votes
0 answers
LogonUserEx, DuplicateTokenEx for Impersonation with an ObjectContext in C#
We have a particular SQL Server which we need to access from a thick (.Net 4.0 WPF) client, and the only credentials available to us for that connection is a 'service' account which is effectively an Active Directory account with permission on the…

Nick
- 2,285
- 2
- 14
- 26
3
votes
2 answers
How to tell what account my webservice is running under in Visual Studio 2005
I'm going a little nuts trying to understand the doc on impersonation and delegation and the question has come up what account my webservice is running under.
I am logged as myDomainName\johna on my development workstation called JOHNXP. From…

John Adams
- 4,773
- 25
- 91
- 131
3
votes
0 answers
Launch an application from a windows 7 service
We are currently using a report printing application launched by a user-defined function located in a Firebird database which runs as a service.
The UDF consists of a simple DLL that launches the reporting application and pass the report ID to be…

Emmanuel .
- 31
- 2
3
votes
1 answer
Go GCP Impersonate two service accounts at the same time
I have two different GCP projects and am trying to clone a persistent disk from one project to the other. I have a service account in each project, and I need to create an impersonation token that will allow me to read the persistent disk from one…

Clark McCauley
- 1,342
- 5
- 16
3
votes
2 answers
Error 403, "The caller does not have permission" when trying to impersonate Service Account in GCP
I have this fairly easy Terraform configuration:
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.19.0"
}
airflow = {
source = "DrFaust92/airflow"
version = "~>…

José L. Patiño
- 3,683
- 2
- 29
- 28
3
votes
0 answers
Upgraded to Keycloak 16.0 - Impersonation NOT working - Though KEYCLOAK_IDENTITY and KEYCLOAK_SESSION Cookie are created
Upgraded to Keycloak from 3.4.0 to 16.0 - Impersonation NOT working - Though KEYCLOAK_IDENTITY and KEYCLOAK_SESSION Cookie are created.
I need to provide the impersonate functionality outside of Keycloak Admin Console, the very similar to…

Nick
- 65
- 1
- 8
3
votes
1 answer
Fetch signedJwt token for google service account
I am trying to generate signedJWT token for google service account
now = int(time.time())
expires = now + 900 # 15 mins in seconds, can't be longer.
payload = {
'iat': now,
'exp': expires,
'sub':…

pythonhmmm
- 833
- 1
- 18
- 38
3
votes
1 answer
How do I switch off WCF client impersonation temporaraly to write to, for example, a log file
I am using the following attribute to implement impersonation on my WCF service, as I need to impersonate the client during the entire execution of the method:
[OperationBehavior(Impersonation = ImpersonationOption.Required)]
The problem is…

Franchesca
- 1,453
- 17
- 32
3
votes
2 answers
Does calling ImpersonateSelf() cancel all security token adjustments made to the same thread?
I don't get ImpersonateSelf(). Suppose my code is run in some host process. That host process created a new thread and adjusted the thread security so that the thread has minimal privileges and now that new thread executes my code.
My code…

sharptooth
- 167,383
- 100
- 513
- 979
3
votes
0 answers
How to run as administrator in ASP.NET Core 3.1 like impersonation in ASP.NET
I used to impersonate in ASP.NET to run the web application as system administrator to let the application work with system methods like creating subdomains by command below in web.config:

Mertez
- 1,061
- 3
- 14
- 38
3
votes
1 answer
Unable to run 'kubectl' commands after using impersonation to fetch GKE cluster credentials
My Objective
I want to use GCP impersonation to fetch my GKE cluster credentials. And then I want to run kubectl commands.
Initial Context
I have a GCP project called rakib-example-project
I have 2 ServiceAccounts in the project…

Rakib
- 12,376
- 16
- 77
- 113
3
votes
1 answer
Can not run EXCEL.EXE as other user after Windows 2004 update
I need to run EXCEL.EXE with a user different than current one; in the past I do this without any issues, but after updating the system to Windows 10 Pro version 2004 (19041.508) this method is not working anymore.
I was using the following class…

forlayo
- 1,371
- 2
- 13
- 23
3
votes
0 answers
Remotely add a domain user as admin when the impersonated user doesn't have domain access
I'm writing a remote administration tool that can grant and revoke admin rights to users on other machines in the network.
I have this configuration:
A remote machine (machine1) with two administrative users:
A local admin: adminA
A domain user…

JohnoBoy
- 566
- 1
- 6
- 26