How to bulk suspend users? | Community
Skip to main content

How to bulk suspend users?

  • June 11, 2019
  • 7 replies
  • 0 views

Can anyone help with a way to suspend 2.5k users from our Zendesk?

I have just been doing a little cleanup and I have done this by exporting all end users to Excel, sorting out which are real/active users and which are old and need removing.

I dont want to delete as I think it's important to know when a user "shouldnt" be getting support so would rather mark them as suspended.

However the only way I can see if via the API and we have no developers in house?

It does seem like there is some major functionality missing from within Zendesk when it comes to house keeping

7 replies

Devan
  • June 17, 2019

Hello Darren,

So currently there is no one-stop shop way to go about bulk suspending users in an attempt to make the overall process more efficient.  

I would recommend leveraging our API with a custom script (see Bulk Delete Organizations).  

I've also linked the primary help article that covers this topic in case you have any other questions on this process.

Hope this helps clarify things better and let us know if there is anything else we can assist with. 


  • Author
  • June 18, 2019

Hi Devan,

Thanks for the reply.

I appreciate what you say about the API, but the API does seem to be a bit of a catch all for any missing features within Zendesk.

You would think basic housekeeping functions would be an integral part of the system as deleting/suspending/updating users would be a basic feature in almost any system.

 


Devan
  • June 26, 2019

Hey Darren,

I completely understand wanting more utility out of our API, and we are continually working to improve our user experience. I would recommend posting the improvements you would like to see in our Product Feedback forum so our development team can consider your feedback. If there is anything else we can clarify for you let us know and thanks for reaching out to us. 


  • Author
  • June 27, 2019

Hi Devan, it's not more functionality from the API that I think is needed, its less reliance on the API for features that should be built in to Zendesk.

Over the 7 years we have been using it we have ended up with thousands of users who are no longer valid.

The only option given natively within Zendesk is for me to manually go in and delete them 1 by 1.  Surely that cant be seen as a "Smart" way to manage things.

I will leave the suggestion on the forum though


  • Author
  • July 22, 2019

For anyone who comes accross this post looking for the same answer, here is what I did

 

1) Export all existing users to a CSV

2) Excel create an API url for each user you want to delete.

eg User ID is: 2818362715

url is: https://<yourdomain>.zendesk.com/api/v2/users/2818362715.json

3) Install CURL

https://develop.zendesk.com/hc/en-us/articles/360001068567-Installing-and-using-cURL

4) Create a batch file with the following commmands:

curl https://<yourdomain>.zendesk.com/api/v2/users/1244560252.json -v -u <your Zendesk username>:<your Zendesk password> -X DELETE >> c:\curl\delete_log.txt

 

The last part of the command ">> c:\curl\delete_log.txt"

is just so I could check back that all worked ok


Is there anyway to bulk unsuspend users?


Nicole17
  • June 29, 2020

Hi Michael - 

I see that this is your first post. Welcome to the Zendesk Community! 

There are two potential ways you could go about bulk un-suspending users: 

1) Zendesk recently released an app called 'Super Admin' which allows the bulk updating  of agents and end users. Admins can purchase the app in the marketplace: https://www.zendesk.com/apps/support/super-admin and you can find more information about how to install and use the app here: https://support.zendesk.com/hc/en-us/articles/360049714874-Installing-and-Using-the-Super-Admin-app

2) Depending on how many users you're working with and whether you have their user IDs, you could also potentially use the API. You would make an API call to api/v2/users/update_many.json?ids=123,456,…
with a payload like this:
{"user":{"suspended":false}}

I hope one of those two methods will work for you. Let us know if any additional questions come up!