While we may not be leading the pack in Salesforce adoption, I'm quite sure that a number of our 400 users are still logged in as If I look at session management in setup, there are plenty of UI sessions that are still valid.

But if I query select users.name from authsession where iscurrent = true as suggested by this sfse response by sfdcfox it only returns my user. The response clearly states that this should return all users.

This will give you a de-duplicated list of all the users with current sessions by name. You can also select any of the other usual User fields.

I have tried in dev console and via anonymous apex. I am a system administrator. Does this look like a bug, or is there something I am missing here? FWIW my org is quite old.

Screenshots below

Dev Console Query Output dev console query output

UI Sessions in Session Management (filtered for parentId = blank) session management active user


Filtering on the isCurrent field on AuthSession for true values returns only values that correspond to your current session (hence, why it only returns your session records).

If true, the session is a member of the user’s current session family. This field is available in API version 37.0 and later.

If you remove that filter, you'll see others' AuthSession's records as you see in the UI.

| improve this answer | |
  • agree that is what we are seeing. i read the phrase "users current session family" to mean the current session family for all users in the query, instead of "current users session family" which is what we are seeing. the link i provided to a response by sfdcfox indicated this should be for all users. so either that post is incorrect, or there is something else going on. – gorav Jun 11 at 11:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.