I have a requirement to create an admin page that shows all the logged in end users. So all the users that have an active session.
This question might be related to https://www.outsystems.com/forums/discussion/34240/how-to-check-all-the-logged-in-users-in-the-tool/, but I don't really understand the answer. I can't seem to find a Session entity using Serice Studio. I've looked in the System, Authentication and Users espaces.
I've also searched online, but was not able to find anything useful about this.
Is this possible and if so could you point me in the right direction?
Hello Kilian,
The session database is (usually) a different database. During the platform installation you have to define it separately. I'm not sure you have direct access to it. In this case, in order to access this database, you need to create an extension and import the entities. To do this, you need the information to create the coneection, including a user to it.
As you can imagine, this is not you should do lightly, for security reasons.
If your installation is in the cloud, doing this will be much more difficulty (if not impossible), as the OutSystems take care of the platform infrastructure.
I'll try to see if there is anything else that can be done, like an alternative solution, or if there is any API that can retrieve the information you need (that I don't know of).Cheers.
Hi Eduardo, Thank you for your reply. So far I've only worked with cloud installations in the OutSystems Cloud. So I wasn't aware of the session database. The customer were this requirement came from is also using the OutSystems Cloud. I don't think this is a must have requirement. For now I have enough information to provide them with feedback. So don't sent too much time researching this.
If somebody has a (solution) I'm still curious to learn from it.
Thanks!
Hi Kilian,
You can do the following:
Hope this helps you to show the active sessions.
Kind regards,
Remco Dekkinga
This code can be easily modified to give you the data you need to make the page you want:
https://www.outsystems.com/forge/component/1886/login-session-timeout-sample/
J.Ja
I'll mark Eduardo's answer as the solution, since I was mainly interested if this was covered with standard platform functionality. Thank you Remco and Justin for pointers how to solve this.