Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to find last login for users using SQL?

Since the Confluence DC REST API is not capable of anything useful, I already realized that I need to do most stuff using SQL.

What I'm currently struggling with is to get the "Last Login" datetime of a user from the DB. Confluence stores this info somewhere, since it displays the correct information in /admin/users/viewuser.action, but I can't find that record in the DB.
I read it multiple times that this info should be in table 'cwd_user_attribute', but there seem to be only records from local user directories, such as the "Confluence Internal Directory", for example. Our users are from a "Atlassian Crowd" Directory (which is configured to use our JIRA instance as Crowd server).

Where can I extract these login times from using SQL? Do I have to look it up in Jira, or is it stored in the Confluence DB but elsewhere?

1 answer

0 votes
Fabian Lim Community Leader Dec 27, 2021

Hi @Marc Richter

We actually use scriptrunner to determine who hasn't logged in for a period of time and we disable them. Look at this sample:

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

43,560 views 32 135
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you