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

SQL query to find all users who never logged in

Hi,

Do you know how can I get the list of users who never logged in into Confluence, while Confluence is connected to JIRA directory.

This query does not seem to work as it brings me users who actually logged in

What is the right way to find these users?

 

Many thanks!

 

select user_name from cwd_user where user_name not in
(SELECT cwd_user.user_name
FROM cwd_user, cwd_user_attribute
WHERE cwd_user_attribute.user_id = cwd_user.id
AND cwd_user_attribute.attribute_name = 'lastAuthenticated');

 

1 answer

1 vote

Hello Simha,

Thank you for contacting us about this. The query is indeed the right one, the same as the one listed in How to check for users who never logged into Confluence:

select user_name from cwd_user where user_name not in
(SELECT cwd_user.user_name
FROM cwd_user, cwd_user_attribute
WHERE cwd_user_attribute.user_id = cwd_user.id
AND cwd_user_attribute.attribute_name = 'lastAuthenticated');

The query should list any users who do not have a last authenticated date listed. I just ran the query on my own instance, and I can confirm it only returns users who have never logged in. 

If you're getting another result there, you could also try the query at How to Identify Inactive Users in Confluence. You'll be able to list users who have not been active since a certain date. 

Let me know if you have any questions about that.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

67 views 3 5
Join discussion

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