Deactivate users
To deactivate a user means to disable it after a period of inactivity that is configurable. For the Workfusion realm, it is set to 90 days by default, implying that all users inactive for more than 90 days are disabled automatically. For all other realms, the default value is zero days, meaning the User deactivation feature is turned off, and users won't be deactivated automatically.
Change deactivation period
important
Before changing the deactivation period, make sure you have the manage-realm role set for the realm-management client in Keycloak. For detailed instructions, refer to Manage and assign realm and client roles.
To change the default deactivation period, follow the steps:
- Choose the required realm and open Realm Settings.
- Go to the Security Defenses tab and then—to the User Deactivation tab.
- Specify the wanted user deactivation period in days and click Save.
To disable the User deactivation feature, set the deactivation period to zero days.

Enable deactivated user
After the deactivation, users remain visible in the system. However, on the Details tab of the Users page, the User Enabled toggle for the user is turned off.
To enable a deactivated user, follow the steps below:
On the Details tab, click the User Enabled toggle.
Click Save.

Capture login events
The job deactivating users functions based on the LOGIN events captured by Keycloak. These events are enabled by default. You are not supposed to switch them off if you plan to use the User deactivation feature. You can also view deactivated users in the event log stored in Keycloak.
Change frequency of user deactivation job
By default, the job that disables users runs according to the scheduler at 00:00:00 AM every day. The job switches off all the users for which the period of inactivity matches the deactivation period in days specified in the settings.
To change the frequency of the job, on the server-side, open INSTALL_DIR/keycloak/keycloak.properties (for example, /opt/workfusion/keycloak/keycloak.properties) and change the value of the workfusion.task.cron.user.disabling parameter.