Hi, @Ajinkya Bele
Welcome to Atlassian Community
If you have ScriptRunner, you can use it, to get users last login dates.
When I had a similar tasks, to collect list of inactive users, I made such script, which retrieves last login dates:
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.login.LoginManager
import com.atlassian.jira.bc.security.login.LoginInfo
// Method to get LoginInfo by username
LoginInfo getLoginInfoByUsername(String userName) {
LoginManager loginManager = ComponentAccessor.getComponent(LoginManager)
return loginManager.getLoginInfo(userName)
}
// Fetch last login time for a specific user
def userName = "your_username_here" // Replace with the actual username
def lastLoginTime = getLoginInfoByUsername(userName)?.lastLoginTime
thanks for the reply but i want to extract last login activity via api token and my jira server is hosted in aws using saml account i want to get the information is it possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, but I'm having trouble understanding your point. Let me clarify:
By default, Jira doesn't provide a method to retrieve the time when a user last logged in. The REST API doesn't support this information.
Regarding SAML, I'm not sure it can provide the timestamp of a user's last login. Since SAML is an AWS service and not part of Jira, the login time information is stored within Jira itself.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Evgenii apart from scriptrunner is there any way to extract last login activity via api token and my jira server is hosted in aws using saml account i want to get the information is it possible?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.