Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to get a user's login details with scriptrunner

How to get a user's login details with scriptrunner

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 02, 2023

Welcome to the Atlassian Community!

I am sorry that I do not quite understand the question, and need to ask for a bit more detail.

What "login details" are you looking for?  

When someone logs into Jira, Jira uses the configured identity provider system(s) to ask the user to uniquely identify themselves, so that it knows that the account logged into belongs to the person logging in.

In the basic case, all you really have available is "this account can log in", "unique ID for this account (with associated display name and email)" and "has logged in".

You can then go off and ask the IDP for more detail about the account in SR, but what you can extract from that depends entirely on the IDP and how it's been integrated.

So, could you clarify "login details" for us?

Login details is what administrators can see when they hit "User management" -> "Users". Is there a way to get this information on the screenshot? with scriptrunner

Screenshot from 2023-05-02 18-30-02.png

Ken McClean
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.
May 03, 2023 • edited

You can use the LoginManager class to accomplish this. Here's an example that returns the login count of the supplied user:

import com.atlassian.jira.component.ComponentAccessor

def loginManager = ComponentAccessor.getComponent(LoginManager)
def loginDetails = loginManager.getLoginInfo("admin")



Worth noting is that if you're working with timestamps such as LastLoginDate, it'll be returned in the Unix Epoch format. So you'll need to do some conversion.
Like Egor Braguntsov likes this

Thanks, that's what I needed

Suggest an answer

Log in or Sign up to answer