How to manually unlock a user from the Account Lockout Policy

When a user is blocked by the account lockout policy, the Account Owner can manually unlock the access. Only recommended for exceptional or urgent cases.

This guide walks you through manually unlocking a user from the Account Lockout Policy and guarantee access.

Go to Account Lockout Policy reference

Manually unlock a user

To manually unlock a user, you need to get the logs and confirm the data about the user. Then, execute the unlocking. To do so:

  1. Run the following GET request in your terminal to retrieve the data of blocked users.
Terminal window
curl --request GET \
--url https://api.azion.com/v4/identity/users?locked=true \
--header 'Accept: application/json' \
--header 'Authorization: 123'
  1. You’ll receive a response similar to this:
Terminal window
{
"count": 2,
"results": [
{
"id": 1,
...
"lockout": {
"locked_at": "20240101T10:20:01",
"unlock_at": "20240102T10:20:01",
}
}
]
}

Where:

KeyDescription
countRepresents the number of blocked user accounts. Example: 2
idRepresents the unique identifier for a user
lockoutInteger
  1. Save the ID of the user you want to unlock.
  2. Run the following DELETE request in your terminal, replacing {id} with the user ID you retrieved in the previous steps, to unlock the specific user.
Terminal window
curl --request DELETE \
--url https://api.azion.com/v4/identity/users/{id}/lockout \
--header 'Accept: application/json' \
--header 'Authorization: 123' \
--header 'Content-Type: application/json'
  1. You’ll receive a response similar to this:
Terminal window
{
"status": "executed"
}

Done. The user was unlocked and now is available to log in again.


Contributors