# Get information of the blocked user

**URL:** <https://community.auth0.com/t/get-information-of-the-blocked-user/104268>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [April 6, 2023, 6:47pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268 "2023-04-06T18:47:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SujayPrabhu96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sujayprabhu96/32/45599_2.png) [@SujayPrabhu96](https://community.auth0.com/u/SujayPrabhu96)\
**Post date:** [April 6, 2023, 6:47pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/1 "2023-04-06T18:47:51Z")

</div>

Hi folks, I would like to add a check for user status before login for users who were enrolled outside Auth0 to the system. But based on my research I found there are no ways to add a check until the login process is completed. I found that if the user is blocked and if that user makes an attempt to login to the application, the user is redirected back to the application with the error message: `user is blocked`. Is it possible to get some user detail like email in the application with the error message?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 6, 2023, 10:01pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/3 "2023-04-06T22:01:46Z")

</div>

Hi @SujayPrabhu96,

Thanks for reaching out to the Auth0 Community!

> [@SujayPrabhu96](#):
>
> Is it possible to get some user detail like email in the application with the error message?

There isn’t any way to bubble up to email address to the application with the error message.

However, one solution I can think of is to use the [Management API’s Search log events](https://auth0.com/docs/api/management/v2#!/Logs/get_logs) endpoint to filter your logs for the [`limit_wc`](https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes#:~:text=.-,limit_wc,-Blocked%20Account) event type code which is the event for blocked accounts.

In these logs, you should be able to see all the details about the blocked event, including the email address, error message, and more.

Does that help?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![SujayPrabhu96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sujayprabhu96/32/45599_2.png) [@SujayPrabhu96](https://community.auth0.com/u/SujayPrabhu96)\
**Post date:** [April 7, 2023, 5:32am UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/4 "2023-04-07T05:32:59Z")

</div>

Hi @rueben.tiow Thank you for the reply.

> However, one solution I can think of is to use the [Management API’s Get blocks by identifier](https://auth0.com/docs/api/management/v2#!/User_Blocks/get_user_blocks) endpoint to get the list of blocked users for a particular connection type. From here, you can get the email address of that user.

How can I get the email address of the user who tried to login? Because if the user is blocked and if he tries logging in, we get only the error message without any user specific information.  
If there is no way to get the user info, I might have to hit the Search log events API along with user IP as search parameter to get the info of the user who tried to login

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 7, 2023, 4:30pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/5 "2023-04-07T16:30:54Z")

</div>

Hi @SujayPrabhu96,

Thank you for your reply.

I have made some edits to my previous post. After checking further, I found that the only possible way to get the information of the blocked user is to use the Management API’s Search log events endpoint.

I understand that it will require some uplift on your part, but this would be the current workaround to accomplish this behavior.

Let me also add that we have the [Add endpoint to get a list of blocked users from brute force protection](https://community.auth0.com/t/add-endpoint-to-get-a-list-of-blocked-users-from-brute-force-protection/77264) feedback request already being tracked in the Community. I recommend upvoting on this feedback so that it gets prioritized sooner based on the number of upvotes.

Please let me know if there’s anything else I can do to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![SujayPrabhu96](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sujayprabhu96/32/45599_2.png) [@SujayPrabhu96](https://community.auth0.com/u/SujayPrabhu96)\
**Post date:** [April 9, 2023, 5:37pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/6 "2023-04-09T17:37:55Z")

</div>

> [@SujayPrabhu96](#):
>
> Search log events

Sure @rueben.tiow . Thanks for your info. I will try it out using Search log API

---

<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:** [April 23, 2023, 5:38pm UTC](https://community.auth0.com/t/get-information-of-the-blocked-user/104268/7 "2023-04-23T17:38:43Z")

</div>

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