I have a requirement for SharePoint Online users to see what other users are currently online.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
Extensive explanation, tutorial, etc.: Find Number of Users Currently Logged on to a SharePoint Site
The gist of it is that you don't have OOTB features to show you the number of currently logged in users. You can check IIS for current users, but you don't know whether these are logged on or not. The solution explained in the blog article is to create a delegate control which resides on all pages which counts the number of current sessions. You still don't really have a "live" view as the web is pretty much stateless and it is hard to know whether a user e.g. closed the browser or switched to another tab.
Thank you for the answer Hardik.
The topic you linked to seems to be the best and only example of doing this.
Even though, I came up with another solution (an easier version of it), so I am posting it as an answer, in case some other people find it useful in the future :)
What I did:
"User" = current userand sets "LastActive" to current time.
now - "LastActive" >= 5 seconds
I didn't post any code, just the logic as it has lots of extra, irrelevant code in my solution.