Skip to main content
Version: 🚧 Next

User Session Retention

🎯 Functional documentation​

The user session removal scheduled provider cleans up inactive user sessions from the Harmoney system. The provider is executed every day by default.

The most recent user session (determined by time_updated field) for each user will never be deleted by this provider. This is because the User Retention process relies on the most recent user session of a user to determine whether a user is active or inactive. If a user has only one session and it is deleted by this provider, the user could be incorrectly marked as "inactive", potentially leading to their inadvertent removal by the user removal scheduled provider.

warning

The provider is a shared provider and cannot be removed. If the provider was somehow deleted, it will be automatically added again with the default settings! The user session removal scheduled provider is not meant to be configured on organization level, because users in Harmoney are not linked to an organization.

The provider will remove user sessions that have a time_updated before the inactivity threshold. The default inactivity threshold removes user sessions older than 3 months. This can be customised in the provider settings. Note that you have to configure the threshold as a relative datetime.

⚙️ Configuration​

Optional parameters​

  • CRON_SCHEDULE: Determines the periodic interval to run the provider. When not provided, the provider will not be executed.
  • batchSize: The maximum number of users that are removed in a single batch. Default is 1000. Maximum 1000 batches are executed on a single provider execution, resulting in at most one million user session removals.
  • inactiveThreshold: Define a threshold. User sessions whose time_updated is before this threshold will be removed. Default is older than 3 months (< -3m).
  • verbose: Enables more logging on INFO level with details on why user sessions could not be deleted. Default false.

Settings Configuration

Examples