use the web api api/users/search , see docs https://yoursonarhosturl/web_api/api/users
Get a list of active users.
The following fields are only returned when user has Administer System permission or for logged-in in user :
‘email’
‘externalIdentity’
‘externalProvider’
‘groups’
‘lastConnectionDate’
‘tokensCount’
Field ‘lastConnectionDate’ is only updated every hour, so it may not be accurate, for instance when a user authenticates many times in less than one hour.
I’m currently on LTS version 8.9.3 and have troubles getting lastConnectionDate out via API. I do a general search over all users (/api/users/search?ps=500) and I get all fields as described in the docs for each user - except lastConnectionDate.
According the docs this field should be available since 7.7, but why it is not shown via API? The user I’m using has administrator rights.
Regards, Thomas
Well, than I really don’t get the point why I do not see lastConnectionDate in the output. Tried different users with admin rights, no change. Is there some kind of switch to use a different version in the API or is the API just as is and comes with settings from the current SQ version?