Skip to content

Instantly share code, notes, and snippets.

View sachatrauwaen's full-sized avatar

Sacha sachatrauwaen

View GitHub Profile
@hikalkan
hikalkan / AccountController.cs
Last active March 20, 2020 07:10
User Impersonation for ASP.NET Boilerplate
/* SAMPLE AJAX CALL to this action:
(This is enough since it's automatically redirected to the target tenant's ImpersonateSignIn action)
abp.ajax({
url: abp.appPath + 'Account/Impersonate',
data: JSON.stringify({
tenantId: 1, //Target tenant id (can be null if target user is a host user)
userId: 2 //Target user id
})