Middleware to get current logged admin

Hello, I just started using Strapi 4.x. I want to create middleware to log user requests. Regular users can access user data through ctx.state.user, but it seems that admin users cannot use this method to access it. How should I handle this?

Currently, I am testing with admin-panel + global middleware.

This topic has been created from a Discord post (1275038799663075338) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

did you ever found a solution?