How to "deactivate a user" in auth0 under user management?

I want to deactivate a user from admin console. Please provide help on how to achieve this.

Hi @saurabh.gupta234816,

If you need to remove/deactivate an Admin, you can do this by going to your Auth0 Dashboard > Settings > Tenant Members and clicking on the triple dot icon, and selecting the Remove option.

If you found this post helpful or interesting, please give it a like :+1: . Your interaction makes a difference. Have a wonderful day! :sun_with_face:

Thanks,
Rueben

@rueben.tiow thank for your reply.
I am looking to “deactivate” a user in below section, as we can do in OKTA tenant.

Hi @saurabh.gupta234816,

Thanks for following up and clarifying what you mean.

If you need to remove users from your tenant, you can do so by either:

  1. Using the Auth0 Dashboard > User Management > Users and clicking on the triple dot menu beside the user profile and clicking on Delete.
  2. Use the Management API’s Delete a user endpoint.

I hope this helps!

Thanks,
Rueben

@rueben.tiow thanks for your reply. But i do not see the “remove” button. I am currently using the trial version. Please confirm if that option would be available in licensed version?

Note: I don’t want to delete the user, I want to “deactivate” the user (soft delete).

Can you please share the docs link to understand the “remove” functionality?

Hi @saurabh.gupta234816,

Thanks for following up.

I just made a correction to my previous post. The correct option you should select is the Delete option.

image

Now, it won’t be possible to “deactivate” the user the way you expect, a soft delete.

As a workaround, you could create a Post Login Action that prevents these users from logging in.

For example:

exports.onExecutePostLogin = async (event, api) => {
  const blacklist_users = ['someuser@example.com', 'someuser2@example.com']
  if(blacklist_users.includes(event.user.email)){
    api.access.deny(`You are not permitted to authenticate to ${event.client.name}.`)
  }
};

Thanks,
Rueben

thanks, i will try the post login action and update you.

1 Like

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