Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
Sivanesan
Partner - Contributor III
Partner - Contributor III

Get last login date for users with login access type

Hi Everyone

We are exploring options to disable a user who hasn't logged into QMC or HUB for certain days through QRS APIs. We use token based license. I came across this post and came to know that for user access type, we can use /qrs/license/useraccesstype to get the last date when the token has been used by the user and also for login access type it was mentioned that /qrs/license/loginaccessusage/full can be used but not sure which field to use. Appreciate your help on this matter. 

Regards

Sivanesan

Labels (3)
2 Replies
Levi_Turner
Employee
Employee

You will need to solve the issue a slightly different way that you are assuming. User Access Passes are assigned to users. Login Access Passes are assigned to a pool which can be used by users if they match the criteria of a Login Access Pass rule. This means to tell whether someone hasn't used a Login Access Pass, you will need to figure out who has then infer those who have not.

  1. Get all users (/qrs/user)
  2. Get all users who have User Access Passes (/qrs/license/useraccesstype/full join user.id to id from 1)
  3. Get all login access usages (/qrs/license/loginaccessusage/full join user.id to id from 1)

Since (3) is purged after 30 days, you may need to add in data on who has logged in from the Proxy > Audit > AuditSecurity logs, you are after descriptions matching Command=Login;Result=0;ResultText=Success.

Sivanesan
Partner - Contributor III
Partner - Contributor III
Author

Hi @Levi_Turner 

Thanks for the response. There is a field called latestActivity in the response of /qrs/license/loginaccessusage/full. Can I consider max(latestActivity) for a particular user as the last time the user used a token to login to Qliksense. And is there any endpoint to the get the audit security logs. Because I want automate the process and don't want to look into the log files manually everytime.

Regards

Sivanesan