Skip to content

Clear a user's sign-in lockout

POST
/admin/users/{ref}/unlock-account

Clears a user’s failed sign-in count and any lockout time, so a lockout no longer stops them signing in.

Anything to clear counts: a count above zero or a lockout time that is set, even one that has already passed. Then unlocked is true and prior_failed_count has the old count. If there’s nothing to clear you get unlocked: false.

It doesn’t touch the separate limit on sign-in attempts from one address, the password, two-factor settings, sessions or tokens. A change is recorded in the audit log as auth.lockout.cleared on a best-effort basis; nothing is recorded when there was nothing to clear. You need auth.unlock (system.admin also works).

ref
required
integer format: int64

What the call did; unlocked says whether anything was cleared.

What the unlock did.

object
user_ref
required
integer format: int64
unlocked
required

true when a failed sign-in count or lockout time was cleared, false when there was nothing to clear. true doesn’t mean the account was locked at that moment.

boolean
prior_failed_count
required

The failed sign-in count before it was cleared. 0 when unlocked is false.

integer format: int32

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed