How to get a list of Confluence users' last password change date
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Purpose
To get a list of all Confluence users' last password change date.
Solution
Run the following SQL query
SELECT cu.user_name, cua.attribute_name, cua.attribute_value
FROM cwd_user_attribute cua
INNER JOIN cwd_user cu
ON cua.user_id = cu.id
WHERE cua.attribute_name = 'passwordLastChanged';
Confluence stores the password last changed time based on epoch time. Hence, to convert it to human readable format:
- Truncate the attribute_value (timestamps) for each user to only 10 digits, instead of the 13 digits stored in Confluence DB.
The extra three digits represent milliseconds and should be omitted before the conversion. - Navigate to the following link and convert the truncated values accordingly.