185
Views
11
Comments
Solved
Ā Logout all users from all applications at midnight
Question
Application Type
Reactive

Hello, 

We have an application requirement for all users to be logged out daily at midnight. We would like to run a nightly time process. The logout action does not have any input parameters and is based on the session user id.

Thanks!

UserImage.jpg
Arvinder Bhalla
Solution

Thank you everyone for your responses. I have opened a ticket with Outsystems to help with the issue.

In the mean time, I have implemented a workaround. I set a flag in the app database for the users, and reset it every night by the timer. The next time the user accesses the application, it checks for the flag and forces user to logout.

Thanks,

Arvinder

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

As you found a solution yourself, I marked it as solution.

2025-09-04 06-33-37
Nikhil___Vijay

Hello @Arvinder Bhalla 

You can use a timer to schedule automatic logouts for all users on your application.

Regards 

Nikhil kumar Vijay


2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

This will never work. The timer runs in a scheduled thread, it has no context of a user let alone all logged in user.

2025-04-01 07-24-52
Bozidar Kovacic

Hi @Arvinder Bhalla,

Maybe there is a workaround by using the UpdateUser action for manually updating User.IsActive boolean attribute when someone logs into the application (true). That way you could do the same update in the Process that uses automatic activity and then assign a timer to that process to make the user inactive (false). 

Hope you catch my drift,

BR

UserImage.jpg
Arvinder Bhalla

Thank you all, appreciate your responses.

The timer doesn't have any user sessions, and the dologout doesn't have any input parameter to pass the user id.

User.IsActive doesn't work either as if marked inactive, the user will not be able to login to the system,




2021-09-06 15-09-53
Dorine Boudry
Ā 
MVP

Why do you want this ?

 What underlying requirement are you trying to satisfy by logging everybody out  ?

UserImage.jpg
Arvinder Bhalla

The application workflow has some role and permission changes based on an action. the new permissions take effect only after user is logged out. Some users do not ever logout and keep the session from previous days and userid is cached, so the older permissions are not cleared. 

2025-04-17 05-42-16
Ajit Kurane

Hi, 

You need to build custom logic to get the login status of user's and that status you need to check in timer action logic. And based on that you can scheduled your timer.

Thanks.

2022-04-29 05-12-00
Rijan Lexter Libunao

Hi! May we know what is your purpose in doing this.
I can only suggest to have a site variable/maintenance  and add a maintenance page in your app. This will tell the user that they can't use the app for the meantime.

UserImage.jpg
Arvinder Bhalla
Solution

Thank you everyone for your responses. I have opened a ticket with Outsystems to help with the issue.

In the mean time, I have implemented a workaround. I set a flag in the app database for the users, and reset it every night by the timer. The next time the user accesses the application, it checks for the flag and forces user to logout.

Thanks,

Arvinder

2024-07-05 14-16-55
Daniël Kuhlmann
Ā 
MVP

As you found a solution yourself, I marked it as solution.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.