Need to log when admin username and password is logging in master realm

Hello team,
I need to log whenever someone with admin username and password is logging in the keycloak through UI ,
for doing that i tried the
kcadm.sh update events/config -r master -s ‘eventsListeners=[“jboss-logging”]’
but then also i was not able to see the logs for the same,
can anyone help that how i can get this log as its very important for us

You can enable “jboss-logging” listener in the Keycloak admin console.
If you go to the “Events” tab, it should be possible to enable it. You
can filter for event types, so you can possibly filter that you are
interested just in the LOGIN evnets. You can also enable admin events to
see what exactly that admin user did in the admin console.

Marek

@mposolda Thanks for your suggestion , is there anyway or rest endpoint to get the events that are registered
just like this kcadm.sh get events --offset 0 --limit 100 but this is the admin-cli
i need the same thing through an api do keycloak provide such kind of api, from where i can get the events

Everything that’s possible via web admin console and kcadm tool, is possible via the Admin REST-API, b/c that’s the base for all of this: https://www.keycloak.org/docs-api/8.0/rest-api/index.html

Look for GET /{realm}/events

@dasniko i tried(keycloak is hosted on port 8480) http://localhost:8480/auth/master/events to get the master realm events and i am getting 404 not found

and when i hit with the admin-cli i get the result but i need rest endpoint to do this
i am using keycloak 3.4 version

Just read the docs thoroughly and use the right path: /auth/admin/realms/{your-realm-name}/events.
Then, you’ll need to make this call authenticated with an access_token, so you need to authenticate yourself first, obtain the token from the token endpoint and use this token in your admin-call.

And last but not least, update your Keycloak version. You’re running a pretty old version…!