[SccriptRunner] - Custom listener in login - Userfailedauthentication envent

Hi, I want to use the Custom listener on the UserAuthenticationfailedInvalidAuthenticationUser event. But I did not find any documentation on this event.

I would like to get some information on the login such as the username used to try to login

What method can I use with UserAuthenticationfailedInvalidAuthenticationUser event Object?

Can you help me?

Thank you

1 answer

1 accepted

This widget could not be displayed.

Hi Cyril,

There are just a couple of thing you can get from a UserAuthenticationfailedInvalidAuthenticationUser event (Occurs whenever a user fails to authenticate). So for example you can get the username and the timestamp that the event happened

log.debug("User name who failed to login: ${event?.username}")
Date date = new Date(event?.getTimestamp())
log.debug ("Date and time event took place : ${date}")

hope that helps,


Thank you for your answer. It is enough for my need, but for my curiosity where can i find all the attribute and method of the object UserAuthenticationfailedInvalidAuthenticationUser

In the link you sent to me, I did not find anything about "username" or "getTimestamps"


Thank you

There is a bug in the inline script of script runner.

when I  I use "event?.username", scriptrunner tells me :

No such property : username in the class com.atlassian.jira.event.issue.issueEvent

 But it works anyway.

The web interface shows the event object as com.atlassian.jira.event.issue.issueEvent object

and the logs shows the event object as com.atlassian.crowd.event.user.UserAuthenticationFailedInvalidAuthenticationEvent object

So if someone get his code underline, they should not consider the web interface error and execute the code to check in the logs


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

152 views 1 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you