# Is there a way to retrieve Last login date/time or active for users from keycloak user events

**URL:** <https://forum.keycloak.org/t/is-there-a-way-to-retrieve-last-login-date-time-or-active-for-users-from-keycloak-user-events/23166>\
**Category:** Getting advice\
**Tags:** admin-console, authentication\
**Created:** [October 31, 2023, 10:43am UTC](https://forum.keycloak.org/t/is-there-a-way-to-retrieve-last-login-date-time-or-active-for-users-from-keycloak-user-events/23166 "2023-10-31T10:43:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![josnowe](https://avatars.discourse-cdn.com/v4/letter/j/dec6dc/32.png) [@josnowe](https://forum.keycloak.org/u/josnowe)\
**Post date:** [October 31, 2023, 10:43am UTC](https://forum.keycloak.org/t/is-there-a-way-to-retrieve-last-login-date-time-or-active-for-users-from-keycloak-user-events/23166/1 "2023-10-31T10:43:07Z")

</div>

I’m looking into the options of retriving the user events which has Last login date/time or active from keycloak admin console and to display it in my UI.

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [October 31, 2023, 10:47am UTC](https://forum.keycloak.org/t/is-there-a-way-to-retrieve-last-login-date-time-or-active-for-users-from-keycloak-user-events/23166/2 "2023-10-31T10:47:30Z")

</div>

Keycloak doesn’t store this information by default.  
You can use a custom event listener, listening to the `LOGIN` event, like the `LastLoginTimeListener` here in my example repository:

> <https://github.com/dasniko/keycloak-extensions-demo/tree/main/event-listener>
>
> //github.com/dasniko/keycloak-extensions-demo/tree/main/event-listener
