python-keycloak icon indicating copy to clipboard operation
python-keycloak copied to clipboard

Way to Impersonate User as you would through the UI, via api

Open Alex-Wenner-FHR opened this issue 3 years ago • 2 comments

Would love the ability to impersonate a user through the api as you are able to through the front end. It would be much easier if this was a capability!

Alex-Wenner-FHR avatar May 20 '21 15:05 Alex-Wenner-FHR

This would be a feature request. It seems to be a single endpoint (POST /{realm}/users/{id}/impersonation) thus it should not be a big effort. What is the use case behind?

double-a avatar May 21 '21 16:05 double-a

I have access to get into our application programmatically, which is authenticated by Keycloak, as my own user or service account, etc. However, often I find myself (as admin) impersonating users to go in and access some of their data to perform actions that I cannot do signed into anyone but the user being impersonated. With this said, the fact that I have to impersonate those users, hinders my ability to do those actions programmatically. Rather now I have to do it all through the UI which is extremely inconvenient and slow!

Alex-Wenner-FHR avatar May 21 '21 16:05 Alex-Wenner-FHR