Hello Everyone,
Is there any approach to retrieve a user's last login details without accessing log files? For example, is there a function or method we could use to capture login information when a user accesses a specific link or application?
Thanks & Regards,
Srikanth.
Discussion posts and replies are publicly visible
No OOTB function or functionality you can't track user login details specific to link and application. Using getlastlogindatetime() -> gives you last login timestamp(Also it does not work properly).Also i would recommend worth checking this application Appian Usage Insights.Recommend creating your own tracking: When a user accesses your app/site, trigger a process to capture the username and now() timestamp. You must implement this on all app entry points (landing pages/interfaces). -> Here you have full control on it.
It is possible to do this with some development and with a service account that is allowed to read the log files during a nightly job. It's also possible to stream Appian's logs to your company/client's services and setup a tool like Grafana (via Loki) to parse / graph results.
Appian officially supports a log reader plugin that can be developed into a fully-functional app usage reporting tool. I've used it to understand what users use each site page and record type (via sites-usage and record-usage). On top of the static reports, if you combine a scraper process model with a generic record and a clever UI that allows configurability of a report, then you can answer almost any question you have about site, record, or API usage directly from within Appian.
It can also be used to tease out whether a specific user accessed a specific record (since there's parse-able metadata in the sites-usage and records-usage logs). I had to do that a couple of times for the security team.
Beyond that, there's not really a way to determine if a specific user clicked on a specific link. The REST Details logs give aggregated information about various back-end links on the environment, but the URLs are pretty obscure and IMO take entirely too much experimentation to get to a modicum of reliable reporting on.
I also had a requirement to track the timing of "page loads", which in many contexts meant "track the amount of time it takes a process model to go between two nodes on the activity chain". That took a bit of brute force tracking as Shubham suggests, since there is no way to access a process model's node timing data from a process report (afaik).
I do a combination approach, which includes both a per-site "username login" tracker like Shubham mentioned above (which tracks the site name and username per day, and writes an updated timestamp if the same user hits the same site multiple times per day); then at the end of the day an automated process reads the login-audit CSV file and reconciles any entries that were missed (such as a user clicking directly into a task from a link in an email) and creates them a fill-in entry in the same table. This works pretty well overall, and has been low-maintenance since initially setting it up.
Recommend creating your own tracking: When a user accesses your app/site, trigger a process to capture the username and now() timestamp. You must implement this on all app entry points (landing pages/interfaces)how can we achieve it, can you please explain in some detail?
Create a User Login Record Type with fields (username, loginTimestamp, appName, site etc...) backed by a database table, and create a lightweight process model that writes login data to this record using loggedInUser() and now() functions.Embed the login capture in the first user interaction (button click, tab selection, or form submission) using a!startProcess() in the saveInto parameter, then leverage the Record data to display data as you want.I would recommend check this plugin also User Activity Tracking
srikanth said:how can we achieve it, can you please explain in some detail
It's pretty (relatively) easy to do also on real-time load of an interface by setting up an API/Integration handler and calling the integration during your on-form data load. This way you can capture the user's login data anytime they load a landing page form prior to them clicking on any buttons/etc.