# Users in the database that were not created through Auth0 get blocked on login

**URL:** <https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037>\
**Category:** Get Help\
**Tags:** api, auth0\
**Created:** [March 9, 2020, 7:15am UTC](https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037 "2020-03-09T07:15:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![info30](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info30/32/12811_2.png) [@info30](https://community.auth0.com/u/info30)\
**Post date:** [March 9, 2020, 7:15am UTC](https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037/1 "2020-03-09T07:15:02Z")

</div>

I have a database with users that weren’t created through Auth0 and I would like to log those users in through Auth0 the problem is whenever the user logs in they get blocked in Auth0. When I use the login script for the database it works perfectly but if I make a login request to `/oauth/token` I get this returned `Status 203 and the message "{\"error\":\"invalid_grant\",\"error_description\":\"user is blocked\"}"`. I have tried adding the connection, tenant and client\_id to the entry in my database (because the ones created through Auth0 had them) and tried turning of brute force detection but neither of those things worked. Anyone have any ideas how to fix this issue?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [March 9, 2020, 3:58pm UTC](https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037/2 "2020-03-09T15:58:36Z")

</div>

As mentioned at ([Troubleshoot Custom Databases](https://auth0.com/docs/connections/database/custom-db/error-handling#troubleshooting-errors)) you can use `console.log` statements to troubleshoot custom database scripts alongside the Webtask Real-time Logs extension.

In this particular case it would be relevant to know the exact user profile that is returned as part of your login script. You can share it here after redacting/obscure the values of the properties. For example, it would be important to confirm if by any chance the profile returned contains a `blocked` property as that is used as means to block a user.

---

<div class="post-metadata">

**Author:** ![info30](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/info30/32/12811_2.png) [@info30](https://community.auth0.com/u/info30)\
**Post date:** [March 9, 2020, 4:13pm UTC](https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037/3 "2020-03-09T16:13:01Z")

</div>

You were right. I was able to fix it by removing a blocked field from my db. Thanks for your help.

---

<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:** [March 24, 2020, 4:13pm UTC](https://community.auth0.com/t/users-in-the-database-that-were-not-created-through-auth0-get-blocked-on-login/39037/4 "2020-03-24T16:13:07Z")

</div>

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