FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Bulk Delete / Reactivate

    Scheduled Pinned Locked Moved
    General Discussion
    5
    5
    8.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      randall
      last edited by

      you can bulk soft delete users, but can you bulk reactivate them?

      mark.robustelliM 1 Reply Last reply Reply Quote 0
      • mark.robustelliM
        mark.robustelli @randall
        last edited by mark.robustelli

        @randall It does not look like there is a bulk reactive. I thought you might be able to use the Import Users API, but it looks like it will throw errors on duplicates. Looks like you will have to loop through the users to enable them.

        https://fusionauth.io/docs/apis/users#reactivate-a-user

        P 1 Reply Last reply Reply Quote 0
        • P
          peanutsunless @mark.robustelli
          last edited by

          @mark-robustelli said in Bulk Delete / Reactivate:

          @randall It does not look like there is a bulk reactive. I thought you might be able to use the Import Users API, but it looks like it will throw errors on duplicates. Looks like you will have to loop through the users to enable them.

          https://fusionauth.io/docs/apis/users#reactivate-a-user geometry dash world

          Thanks for this guide. This is what I need.

          1 Reply Last reply Reply Quote 1
          • R
            reply 0
            last edited by

            thanks for sharing...

            S 1 Reply Last reply Reply Quote 0
            • S
              sjames05569 @reply 0
              last edited by

              Managing users in bulk can definitely be a bit nerve-wracking when you're doing it for the first time.
              If you’re looking for a quick way to handle this, the FusionAuth Search API is probably your best friend here. You can run a query to get the IDs of the users you want to target, and then loop through them with a simple script using the Delete User API.
              If you just want to "deactivate" them instead of a hard delete, you can toggle the active flag to false in the User object. This is usually a safer bet if you think you might need to reactivate them later without losing all their historical data or linked identities. Just a heads-up: make sure you have a good backup of your database before running any bulk scripts—it's saved my skin more than once!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post