Last login date for separate applications in tenant

Hi @rga,

Welcome to the Auth0 Community!

Unfortunately, it is not possible to get a user’s last login date for separate applications.

As a workaround, I recommend creating a Post Login Action script where you save the last_login property based on the application they are logging into in the user_metadata.

To do so, you will need to call the Management API in Actions to get the last_login property and then call the api.user.setUserMetadata method to save this value.

For example:

api.user.setUserMetadata(event.client.name, last_login)

This way, you can save the last login date for each separate application and query it in the future by checking the user_metadata.

I hope this helps!

Please let me know if you need any help with implementation or need further clarification.

Thanks,
Rueben