Block and Unblock Users
You can use the Dashboard to block or unblock a specific user's access to your applications. If a blocked user tries to log in to an application, they will be redirected from the application with the error message user is blocked
in the URL. Blocking users does not expire. You must unblock the user to allow the user to have access to your applications again.
Block users
Go to the Dashboard > User Management > Users.
To the right of the user's name that you want to block, click ... and choose Block. Alternatively, you can click the user's name and scroll to the bottom of the Details tab, next to Block user, click Block.
Unblock users
To unblock users, we provide multiple methods, which match the way in which the user was blocked. Users can be blocked in a few different ways:
blocked automatically due to the user providing an excessive number of incorrect credentials
blocked through the Auth0 Dashboard by an administrator
blocked through the Management API by updating the user profile to set
blocked
tofalse
Unblock a user who was automatically blocked
When a user is blocked due to the user providing an excessive number of incorrect credentials, you can use Auth0's Management API to unblock them.
Use the Unblock by Identifier endpoint to pass an identifier (username, phone number, or email):
curl -X DELETE https://{yourAuth0Tenant}.auth0.com/api/v2/user-blocks/john.doe%40gmail.com
Was this helpful?
Or use the Update a User endpoint to patch the user_id
:
curl -X PATCH -H "Content-Type: application/json" -d '{"blocked":false}' https://{yourAuth0Tenant}.auth0.com/api/v2/users/{user_id}
Was this helpful?
Unblock a user who was blocked through the user profile
When a user is blocked through their user profile using either the Management API or by an administrator using the Auth0 Dashboard, you can unblock them in one of two ways: by having an administrator unblock them through their user profile using the Auth0 Dashboard or by updating the blocked
attribute in their user profile using the Management API.
Using the Auth0 Dashboard
To unblock a user using the Auth0 Dashboard, an administrator should:
Go to the Dashboard > User Management > Users.
To the right of the user's name you want to unblock, click ... and choose Unblock. Alternatively, you can click a previously blocked user's name and scroll to the bottom of the Details tab, next to Unblock user, click Unblock.
Using the Management API
blocked
attribute to false
:curl -X PATCH -H "Content-Type: application/json" -d '{"blocked":false}' https://{yourAuth0Tenant}.auth0.com/api/v2/users/{user_id}
Was this helpful?