I have an enterprise account please suggest the possible ways
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.ComponentAccessorimport com.atlassian.jira.security.login.LoginManagerimport com.atlassian.jira.bc.security.login.LoginInfo// Method to get LoginInfo by usernameLoginInfo getLoginInfoByUsername(String userName) {LoginManager loginManager = ComponentAccessor.getComponent(LoginManager)return loginManager.getLoginInfo(userName)}// Fetch last login time for a specific userdef userName = "your_username_here" // Replace with the actual usernamedef 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?
@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?
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.
It looks like you're new here. Sign in or register to get started.