Let's discuss about the code behind the IAM prefilters (Active- Inactive user)

  • 19 April 2023
  • 3 replies

Userlevel 4
Badge +11

In my opinion, the prefilters Active- and Inactive users in the IAM users screen are misleading, what do you guys think?

I would have expected the condition behind the prefilter to look at whether the user falls between the start and end date of the account. 

In the example below, I would expect this as an active IAM user. 


Actual date 19-04-2023 is between 17-04-2023 and 21-04-2023

What the prefilter actually seems to do is look at the user's log sessions. 

from [usr] as t1
where ((exists (select 1 from use_log_session l where l.tenant_id = t1.tenant_id and l.usr_id = t1.usr_id)
)  and (exists(
   select 1
   from tenant ra1
   where ra1.tenant_id = t1.tenant_id
     and (dbo.is_authorized_tenant(ra1.tenant_id) = 1)
) )
  and (t1.[name] = N'(In)active ((In)active)
order by t1.[email]


If my interpretation of active/inactive in previous example is wrong I would expect the prefilter based on current sessions to filter for users "currently" having an active session in the application. This does not seem to be the case either, see the example below.   

The user's session ended yesterday but still shown as an Active user

I would like to hear how the filter intended and whether more people are unclear about it. 

This topic has been closed for comments

3 replies

Userlevel 4
Badge +3

Hey Dennis,

Good question (imo)! I will see if I can gather some insights into this. I don't know the answer to it either, since the prefilters were created quite some time ago and I wasn't part of the team back then.

Let me get back to you when I find out more 😉

Userlevel 4
Badge +11

Hey Renéé,

Been able to find out anything yet 🙂?

Userlevel 4
Badge +3

Hey Dennis,

Unfortunately no. I have personally been away for the past three weeks on holidays and we are currently very busy with the final stretch to wrap up the 2023.2 release.

I have put this one on my to do list to discuss as soon as we are finished with the 2023.2. Hopefully that is okay for you 😄