Kentico AuthenticationHelper.ImpersonateUser

Edward Nelsen asked on December 14, 2021 09:31

I have an admin tool I use to allow me to impersonate a user (can't use the built in Kentico tool as I need to do other stuff with 3rd parties).

For the last few years (from Kentico 11) I have used this method without any issues:

private static void ImpersonateUser(string alias) { var userToImpersonate = GetUser(alias); AuthenticationHelper.ImpersonateUser(userToImpersonate, null, true); } But now I see the method only works for administrators. However, the above method doesn't throw any exceptions. Are there any permissions I can set for my custom UserImpersonator role? I don't want to give them admin rights.

I'm Using Kentico Portal Engine v12.0.65

Recent Answers


Juraj Ondrus answered on December 14, 2021 11:19

There was a bug in Kentico 11 which was fixed. As the documentation says "Users with the Administrator privilege level can "impersonate" other users.". So, I am afraid but only these users can use the impersonalization feature.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.