# Retrieve a list of Blocked Users not working

**URL:** <https://community.auth0.com/t/retrieve-a-list-of-blocked-users-not-working/187830>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [June 11, 2025, 6:09am UTC](https://community.auth0.com/t/retrieve-a-list-of-blocked-users-not-working/187830 "2025-06-11T06:09:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent5](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vincent5/32/71837_2.png) [@vincent5](https://community.auth0.com/u/vincent5)\
**Post date:** [June 11, 2025, 6:09am UTC](https://community.auth0.com/t/retrieve-a-list-of-blocked-users-not-working/187830/1 "2025-06-11T06:09:25Z")

</div>

Hello Community! I’m working on a script for the login page, where I will automatically unblock a user if the user gets blocked due to Brute Force Attack after 15 mins of being blocked (since there is no way to configure that in the website) only being able to be unblocked twice.

The problem is getting the user list by doing q:blocked=true, but not able to retrieve anything even when there is a dummy user that is blocked by brute force

this is the request I am doing in python

```auto
def get_blocked_users():
    headers = {
        'Authorization': f'Bearer {get_management_token()}',
        'Accept': 'application/json'
    }
    url = f'https://{AUTH0_DOMAIN}/api/v2/users'
    params = {'q': 'blocked=true'}
    resp = requests.get(url, headers=headers, params=params)
    resp.raise_for_status()
    print(resp.json()) # check for response here
    return resp.json()

```

Will it only get the users that are blocked by the admin or other means and will not show the ones who are blocked by brute-force?

I have managed to make a workaround for this problem which is to base the blocked users using logs type:“limit\_wc”, but it is not nearly as efficient as the one I am asking.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [June 30, 2025, 4:00pm UTC](https://community.auth0.com/t/retrieve-a-list-of-blocked-users-not-working/187830/3 "2025-06-30T16:00:36Z")

</div>

Hi @vincent5

Welcome to the Auth0 Community!

Thank you for posting your question. The behaviour is observed that you don’t see users who were blocked by the Brute Force Protection is expected behaviour. You can read more about that here → [Query Users Blocked by Brute Force Protection Using the Management API](https://community.auth0.com/t/query-users-blocked-by-brute-force-protection-using-the-management-api/126905?utm_source=chatgpt.com)

Thanks!  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 14, 2025, 4:01pm UTC](https://community.auth0.com/t/retrieve-a-list-of-blocked-users-not-working/187830/4 "2025-07-14T16:01:26Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
