How to set Group Level SSO Session Idle Timeout

I want to set SSO Session Idle Timeout different for each group.

For example, I have 1000 different groups and 100 users in each of those 1000 groups, then I want to set SSO session Idle different for each group.

I have defined an attribute at group level named “groupLevelTimeout” in which I store time in minutes after which users in that group should be logged out after those minutes of inactivity.

How can I achieve this in keycloak? I am using Java 11 and Keycloak 20.0.1