You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes find myself in a situation where I want to block many users at once. It would be nice to be able to script it in a shell script using the Auth0 cli.
Currently the Auth0 cli provides commands to list and remove blocks on user accounts, but no way to add a block.
Looking at the Auth0 API, it seems like the action I would want would be to set "blocked" to true on the user update endpoint. No equivalent flag is available on the auth0 users update command.
Describe the ideal solution
There should be a way to block a user using the Auth0 cli tool that's equivalent to blocking a user in the management dashboard.
Either an argument in auth0 users update, which would seem to match how this task would be accomplished using the User Management API, or a command like auth0 users blocks add.
Alternatives and current workarounds
As implied earlier, I could use the User Management API with curl or equivalent, but it would be a smoother workflow to use the cli tool that is already authenticated rather than having to set up a token-based way to authenticate.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Hey @hexpunk, whilst this isn't supported by the auth0 users update command currently, in the v1 beta you could achieve this using the auth0 api command that allows you to make authenticated requests to the Management API.
So to block a user you would use the following command auth0 api patch "users/<user_id>" --data "{\"blocked\": true }.
Checklist
Describe the problem you'd like to have solved
I sometimes find myself in a situation where I want to block many users at once. It would be nice to be able to script it in a shell script using the Auth0 cli.
Currently the Auth0 cli provides commands to list and remove blocks on user accounts, but no way to add a block.
Looking at the Auth0 API, it seems like the action I would want would be to set "blocked" to true on the user update endpoint. No equivalent flag is available on the
auth0 users update
command.Describe the ideal solution
There should be a way to block a user using the Auth0 cli tool that's equivalent to blocking a user in the management dashboard.
Either an argument in
auth0 users update
, which would seem to match how this task would be accomplished using the User Management API, or a command likeauth0 users blocks add
.Alternatives and current workarounds
As implied earlier, I could use the User Management API with
curl
or equivalent, but it would be a smoother workflow to use the cli tool that is already authenticated rather than having to set up a token-based way to authenticate.Additional context
No response
The text was updated successfully, but these errors were encountered: