How to retrieve from the database the last time users set their password in Jira Data Center
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
In Jira Data Center, you can find when users last changed their password by querying Jira's database.
Solution
The easiest way to get information for users in Jira that have set their password is from the cwd_user_attributes table.
You can run the following SQL query against Jira's database to retrieve details for all users:
SELECT cu.user_name, cua.attribute_name, to_timestamp(CAST(cua.attribute_value as bigint)/1000) as "passwordLastChanged"
FROM cwd_user_attributes cua
INNER JOIN cwd_user cu
ON cua.user_id = cu.id
WHERE cua.attribute_name = 'passwordLastChanged';Was this helpful?