@cortez.connelly
To block a user with immediate effect in Auth0, you can use the Management API to update the user's blocked status. Here is a step-by-step guide on how to do it:
1
|
curl --request PATCH --url 'https://YOUR_DOMAIN/api/v2/users/{USER_ID}' --header 'authorization: Bearer YOUR_ACCESS_TOKEN' --header 'content-type: application/json' --data '{"blocked": true}' |
Replace YOUR_DOMAIN, USER_ID, and YOUR_ACCESS_TOKEN with your Auth0 account domain, the ID of the user you want to block, and the access token you obtained in step 1, respectively.
Please note that blocking a user in Auth0 will prevent them from logging in, but they can still be unblocked by an administrator if needed.