Remove folders of non active JupyterHub users

Hello,
We are trying to identify users who are not active in JupyterHub so we can clean up some space (remove their JupyterHub home folders). We are using AD group for granting access to JupyterHub.
Where can we find a list of users that were not active in some period of time?
I heard that when JupyterHub is integrated with LDAP we cannot get it from JupyterHub admin view, is this true?
Can we get it from JupyterHub database, if so, in which tables we can get this information from?

Users and servers have a last_activity field that you can access through the API:

You can also see this on the /hub/admin page if you have the correct permissions.