This is one of our old tools that has been implemented for many of our larger customers.

It is possible to get a list of all the current sessions in the Sitecore backend. You get a lot of info on the users logged in, such as their usernames, when they logged in, when they did the last action, and their session id. The code is very simple, it looks like this:

List<DomainAccessGuard.Session> sessions = DomainAccessGuard.Sessions;
using Sitecore.Web.Authentication

This will give you a list of session objects for the users that has been logged into the system. As Sitecore backend session usually is very long, the list won’t usually be cleaned out, unless your editors always uses the logout buttons (and usually they just close their browsers).

We use the informations for some simple Things, such as checking if we can put an update online, that’ll restart Sitecore. We can restart Sitecore, if there are none logged into the backend, so no one will be bothered.

We have also implemented the functions for one of our hosting partners, where they can have their monitoring tools to look at a page we made, which gives the number of currently logged in users. This enables the hosting provider to monitories the utilization of the backend server.