[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

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 Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,110 views 13 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot