# How to check Account Lockout Policy logs

import DocButton from '~/components/webkit/DocButton.vue';
import Tag from '~/components/webkit/Tag.vue';

<Tag severity="info">Preview</Tag>

**Account Lockout Policy** generates logs containing information related to the failed login attempts and account lockouts. This way, you can monitor security events and take action.

This guide walks you through checking the logs generated by Account Lockout Policy.

<DocButton href="/en/documentation/products/accounts/account-lockout-policy/" label="Go to Account Lockout Policy reference" kind="secondary" target="_blank" size="medium" />

---

## Checking Account Lockout Policy logs

:::note
To check the Account Lockout Policy logs, you must have *Account Owner* privileges.

If you aren't an *Account Owner* or if the account doesn't have the policy activated, the system returns an *Error 403*.
:::

1. Run the following `GET` request in your terminal to retrieve the data of blocked users.

```bash
curl --request GET \
  --url https://api.azion.com/v4/identity/users?locked=true \
  --header 'Accept: application/json' \
  --header 'Authorization: 123'
```

2. You'll receive a response similar to this:

```bash
{
  "count": 2,
  "results": [
    {
      "id": 1,
      ...
      "lockout": {
        "locked_at": "20240101T10:20:01",
        "unlock_at": "20240102T10:20:01",
      }
    }
  ]
}
```

Where:

| Key | Description |
| ----------- | ----------- |
| `count` | Represents the number of blocked user accounts. Example: `2` |
| `id` | Represents the unique identifier for a user |
| `lockout` | Integer | Represents the period during which the user account will be blocked, with `locked_at` being the timestamp for the start and `unlock_at` indicating when the lockout will end |

3. Additionally, you can also run the following `GET` request in your terminal to retrieve the data of allowed users.

```bash
curl --request GET \
  --url https://api.azion.com/v4/identity/users?locked=false \
  --header 'Accept: application/json' \
  --header 'Authorization: 123'
```

4. You'll receive a response similar to this:

```bash
{
  "count": 2,
  "results": [
    {
      "id": 1,
      ...
      }
    }
  ]
}
```

:::tip
Check the [Azion API documentation](https://api.azion.com/) to know more about all features available via API.
:::