1,538 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
1
vote
2
replies
71
views
How to start new process as another user from PowerShell and use the target user environment?
runas /user:someuser /profile cmd
Starts cmd.exe as someuser and that user's environment. E.g. inside cmd.exe
>echo %USERNAME%
someuser
However, when I am trying to do a similar thing from ...
2
votes
0
answers
52
views
Can I impersonate a gMSA (managed service account) with LogonUser/WindowsIdentity to test folder write access? [duplicate]
I’m building a Windows installer (WPF, .NET 8) that needs to validate a chosen account (either a domain user or a gMSA) can write to several directories before installation. The simplest way I’ve ...
0
votes
1
answer
55
views
Blazor Server Side Windows impersonation to update Active Directory fails
I am creating a Blazor server-side web application to have users update some Active Directory fields. The systems manager is making a security group to place users in so he can control what fields in ...
4
votes
1
answer
99
views
Is it safe to close a duplicated token handle during impersonating with ImpersonateLoggedOnUser?
I'm duplicating a window's process token and using it to impersonate the user:
DuplicateTokenEx(lsassProcessToken, 0x2000000, NULL, SecurityImpersonation, TokenPrimary, &duplicatedToken);
...
0
votes
1
answer
66
views
Azure DevOps Pipelines - Impersonation on self-hosted agent
I have a pipeline that will run a python script as a task, this script requires access from a specific service account, what's the easiest way I can run this script as another user while keeping the ...
-1
votes
1
answer
67
views
Running xp_cmdshell via impersonation not working without sysadmin rights
I have SQL Login "A" and Windows Login "B", which is sysadmin.
"A" has impersonation enabled for "B". Thanks to that, I'm able to run xp_cmdshell in context of ...
1
vote
0
answers
591
views
Token exchange with lightweight access token
I am trying to figure out how to perform lightweight access token exchange in Keycloak 26. So far I was able to make it work with regular access token with the following:
# get the access token
...
1
vote
0
answers
355
views
LogonUser from advapi32.dll not working on Win11 24H2
I have a piece of code that was working for over 10 years and now we see on Win11 after updating to FeaturePack 24H2 that something goes wrong - can't use the LogonUser method anymore - always ...
1
vote
1
answer
434
views
How to call Dynamics 365 and impersonate the calling user?
I have a custom ASP.NET Core 8.0 web application from where I want to call Dynamics 365 and impersonate the currently logged in Windows user.
This code works when calling an on-premise installation of ...
1
vote
0
answers
63
views
Crystal Reports SP 33 Runtime ASP.NET Integrated security
I'm using Crystal reports runtime 33 in ASP.NET for the first time, last version that we used was 21. The reports connection it's with SQL Server and the code used:
Dim cnnInfo As CrystalDecisions....
0
votes
1
answer
50
views
Spring SwitchUserFilter sees no existing authentication
I’ve got the whole impersonation setup: filter, authentication, the works. This is a Vaadin application based on SpringBoot.
@Bean
public SwitchUserFilter switchUserFilter() {
...
1
vote
0
answers
42
views
.NET Framework WindowsIdentity bug with Kerberos where sessions never purge
In C#, I have noticed that when using WindowsIdentity.RunImpersonated and passing in a SafeAccessTokenHandle and then disposing of the SafeAccessTokenHandle, when you run C:\\klist sessions, the ...
0
votes
0
answers
111
views
alternative to impersonation or LogonUser
Some winform application built and use the impersonation to access/write the shared folder on network using service account. This is to prevent assign the access rights directly to the end user.
Is ...
0
votes
2
answers
346
views
Symfony 6.4 - Impersonating User - Cannot access routes with parameters
context: I'm developing a Symfony 6.4 application where a parent can have several children and interact with the application under their names. So I have a parent (User entity) linked to one or more ...
1
vote
0
answers
85
views
Access Denied When Using WindowsIdentity.RunImpersonated for File Operations
I am trying to perform file operations (upload, download, delete) in a user's file system using impersonation in C#. After researching, I came across the WindowsIdentity.RunImpersonated method, which ...