Hi,
could you please suggest me better approach like how can get inactive user list in the environment and last login inactive user ?
I have seen, we can get to know in admin console but if we want check without admin console like any functions to check?
thanks
Discussion posts and replies are publicly visible
You can make use of default user record to get deactivated users.
a!queryRecordType( recordtype:'recordType!{SYSTEM_RECORD_TYPE_USER}User', fields:{ 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active'}, filters: a!queryFilter( field: 'recordType!{SYSTEM_RECORD_TYPE_USER}User.fields.{SYSTEM_RECORD_TYPE_USER_FIELD_active}active', operator: "=", value: false ), pagingInfo: a!pagingInfo(1,5000) ).data
getdeactivatedusersby( "username", null, 2 )
Thanks shubam,
is there any possibility to check the last login time?
You can use the getLastLoginDateTime() function, but it only works on system logs. Appian doesn't maintain login logs beyond 30 days. I recommend moving this information to a table via a nightly job, which will allow you to have continuous, up-to-date data. However, this requires custom development.
again thankyou shubham,
and just want to check with you Shubham Aware please let me know if have any idea about below query...
in my environment ,10 active user are present but they are not logging from 5 months and we have to identify who are all not logging from 5 months then need to deactivate the user...in the environment?
System logs retain data for approximately 30 days, so you cannot retrieve login information older than this, for future tracking, you should implement a process to regularly store login data to maintain historical records.Also exact retention period may vary depending on your environment’s log configuration and maintenance policies check this properly ocne.