
wnby5 (wnby5) asked a question.
This is a customer facing app where we provide the customer with their last login date and. In this effort, we are migrating the customers to Okta Universal Directory and Authentication. As Okta is now the source of truth for last login, we need to display it. Seems easiest to add it to the user's profile and update it at login. Suely someone has had this need. Or is an API call the best solution at run time?

Hello @wnby5 (wnby5) Thank you for reacting out to our Community!
At this time this attribute is not set in the Okta user profile. You can find this value from Reports->Password health Report will have this value or serach for the user using API {{url}}/api/v1/users/{{userId}} and "lastLogin" attribute returned in JSON can be used.
Community members help others by clicking Like or Select as Best on responses. Try it today.
Thanks for your note. Yes, last login is avaialble on the profile but once the user has logged in, 'last login' is the login just affected. As is common in cutomer -facing apps, we want to show when they last logged in previously. So if we access it pre-login it would be the desired value, but that's an effort adn will slow down the login process my developers believe. Or am I missing something?
Last login atribute is based on the last time user logged in into Okta, and not the previous value. That would be a feature request more then a functionality at this time.
You can add a Feature Request on our Idea section, for a chance that this functionality to be added in the future.
https://support.okta.com/help/s/ideas