Hi Jo,
Welcome to Q&A Forum; this is a great place to get support, answers, and tips.
Thank you for posting your question; I'll be more than glad to help you out.
There is no "ready-to-use" script or built-in functionality... you have to create your own "monitoring" solution for it
For example, create an Azure automation workflow that connects every x minutes to your database and writes the result of sp_who into a table, then you can run your report on it...
Or you write automation using a login TRIGGER
I hope my answer is helpful to you,
Your
Bjoern Peters
If the reply was helpful, please upvote and/or accept it as an answer, as this helps others in the community with similar questions. Thanks!