Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Track the Number of Active Individual Users in Jira & Confluence Data Center?

Houssein Barkallah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2025

Hi Community,

I'm currently administering both Jira and Confluence Data Center and I'm looking for a reliable way to track the number of active individual users over a certain period (e.g., past 30 or 90 days).

2 answers

0 votes
Stefan Stadler
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2025

Hi @Houssein Barkallah 

if you are using ScriptRunner, you could create some kind of REST API to display the current amount of active users or create a job to run actions on inactive ones.

The following code can get all users that have had a login within the last 30 days as an array. And of course, this array could then be used for further processing.

import com.atlassian.jira.bc.security.login.LoginInfo
import com.atlassian.jira.security.groups.GroupManager
import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.login.LoginManager


GroupManager gm = ComponentAccessor.groupManager
LoginManager loginManager = ComponentAccessor.getComponent(LoginManager)

List<ApplicationUser> users = []
int threshold = 30
gm.getAllGroupNames().each{group->
gm.getUsersInGroup(group).each{
if(it.active) {
LoginInfo loginfo = loginManager.getLoginInfo(it.username)
if (loginfo.getLastLoginTime() == null) {
if (!users.contains(it)) {
users.add(it)
}
}
else {
Date lastLogin = new Date(loginfo.getLastLoginTime())
int dif = new Date().minus(lastLogin)
if (dif >= threshold) {
if (!users.contains(it)) {
users.add(it)
}
}
}

}
}
}

return users

Hope this helps!

Stefan

0 votes
Jaime Escribano
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 9, 2025

Hi @Houssein Barkallah !

 

I see theres a feature request for a use case similar to this one: [JRASERVER-2841] List users inactive over a period of time - Create and track feature requests for Atlassian products. so I don't think you can have a lot of success with the UI.

 

If you have SQL access to the JiraDB, you can follow the steps outlined in this documentation to select users and their last log-in Find the last login date for a user in Jira server | Jira and Jira Service Management | Atlassian Support

It was updated on Aplil 2025 so it should be relevant enough 😊

 

Hope that was helpful!

 

Regards,

Jaime Escribano

 

Suggest an answer

Log in or Sign up to answer