I would like to pull the last login timestamp of all the users. getuserlastlogin(userName) function is not working when I pass all active users. It's giving output for couple of them. Not sure if it's checking for a specific time range. I'm on 19.2, Any suggestions or other functions available in the market?
The rule appears to only take one username as a parameter. Have you tried looping over your list of users using a!forEach()? This may have performance implications but if this is just for testing or some off-peak maintenance utility, I figure it shouldn't be too bad.
Yes, I did that but I'm not getting timestamp for all users
a!forEach( expression: fv!item&"-"&getuserlastlogin(fv!item), items: getdistinctusers(cons!APPIAN_ALL_USERS))
Weird - so if you run the function on one of the usernames that's apparently not getting a timestamp in the forEach loop, does it come up with a timestamp then? If so, then I suppose there might be a limitation to the plug-in this rule is from ("User Login Details"). I was going to suggest you comment there but I can see you've already done so :)
Also - you might also try looking through the "login-audit.csv" log file backlogs and see whether there are logins represented in those that aren't being returned by the function. I'm guessing, if anything, that only those logins seen in the (non-archived) login-audit.csv file history will be reported by this function.
I can see last one month files are non-archived but the function giving timestamp only for entries in today's file.
That also seems to be what I'm seeing when I try in one of my dev environments. I think at this point you might need to either wait for feedback from the plug-in author, or seek out alternative ways to do this. I've dealt with it before (but a while ago) and it's always been fairly tricky. You might look into the "Login Information Parser" plug-in, which I've noticed has been updated quite a bit more recently.
Discussion posts and replies are publicly visible
© 2019 Appian. All rights reserved.