Here is a very simple query you can run against your Business Database to find out who are the users that have an active sessions in AX:
SELECT DISTINCT USERID, CLIENTCOMPUTER FROM SYSCLIENTSESSIONS WHERE STATUS = 1
This table has some more useful info that you can extract so you can tune the query for your own use.
use SELECT * from SYSCLIENTSESSIONS to see the whole table.
** This works for AX 2009 /2012