How to find the last Login for Users

In the following article is descripted how to find the last Login for users.

But this somhow hase an error. When i open in Confluence (5.9.12) then there are three Dates showed:

Created, Last Updated, Last Login.

With the query shown with cwd_user_attribute.attribute_name = 'lastAuthenticated' there is displayed the 'Last Updated'-Date and not the last Login-Date.

When is this field updated and whats the meaning of 'Last Updated'?

Thanks for any help.

1 answer

1 accepted


The query I am using for this purpose doesn't look like any of the ones in that example but does seem to present consistent data that I would find on a random sampling of users. Give this one a try. If you also happen to have more than one user directory configured, it will give you that as well.

SELECT u.user_name, d.directory_name, l.successdate
FROM logininfo l
JOIN user_mapping m ON m.user_key = l.username
JOIN cwd_user u ON m.username = u.user_name
JOIN cwd_directory d ON u.directory_id =
ORDER BY directory_name, successdate;

Hi Mike

Thank you for your query. Thats exact what i'm looking for. The table logininfo i have not seen.

Have a nice day and thanks again for your quick help.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Agile

What is ChatOps? A guide to its evolution, adoption, and significance

I am the product of AIM. I can hear that door swinging open and closed in my mind with absolute fidelity. I’d recognize that ding anywhere. At 15, as I typed away into AOL IM, I never imagined that ...

47 views 1 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you