Programmaticaly find user with "CAPTCHA required at next login" and reset it

Hi all

there is a way to find all user with CAPTCHA error and then reset the failed login count using *only* RESTfull calls?

I didn't found anything in Jira Rest doc
https://developer.atlassian.com/cloud/jira/platform/rest/

 

Thanks

 

1 answer

This widget could not be displayed.

Hi Andrea,

If you're using JIRA 7.x+ take a look at the Communities post How to Reset Captcha with the API for a User.  It provides guidance to use the LoginManager:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.login.LoginManager

def loginManager = ComponentAccessor.getComponent(LoginManager)
loginManager.resetFailedLoginCount(user)

How to set the username string will depend on the context you're working in (REST Endpoint, Workflow Function, etc.).

Hopefully that helps!

Cheers,

Branden

Thanks Branden for your answer but I'm looking for a simple REST call and we don't want use any additional plugin for that.


And, to be honest, I don't know how I can invoke your groovy code. Do you have a link to a guide?

Basically, I want to reset the failed login count from my pc when I received a mail.

 

Thanks

Andrea

Hi Andrea,

Thank you for following up.  At this time a plugin is the only way I've seen this done.  I would definitely advise you to go to JAC and create a Suggestion for this feature in the API.  If you do that please post the link here so the Community can vote on it and add impact.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

536 views 23 15
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