# Unable to delete account using new server-to-server OAuth app

**URL:** <https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557>\
**Category:** Users and Groups\
**Created:** [August 19, 2022, 4:44pm UTC](https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557 "2022-08-19T16:44:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jferguson](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jferguson/32/9015_2.png) [@jferguson](https://devforum.zoom.us/u/jferguson)\
**Post date:** [August 19, 2022, 4:44pm UTC](https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557/1 "2022-08-19T16:44:38Z")

</div>

[https://api.zoom.us/scim2/Users/$userid?action=delete](https://api.zoom.us/scim2/Users/%24userid?action=delete)

Switching my deprovisioning cript over from using the JWT token to the new server-to-server app using OAuth. The OAuth token is working to enumerate the list of users but is failing when trying to delete a user.

The APi shows it needs the scopes `user:write:admin` , `user:write`. I’ve added the scope ‘user:write:admin’ to my app but ‘user:write’ is not an available option to select. The only other option I see is ‘user:read:admin’, which I did enable to see if it made any difference.

My role is ‘SecondaryOwner’ which I’ve confirmed has ‘Server-to-server OAuth app’ enabled, as well as all settings under "Zoom for developers’.

The error I’m seeing is “The remote server returned an error: (400) Bad Request.” With a status code=400.

The same code works as is with the JWT token so I believe I’m missing a permission rather than it being a coding error. Anything else I can look at?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 26, 2022, 3:12pm UTC](https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557/2 "2022-08-26T15:12:27Z")

</div>

Hi @jferguson  
I am sorry to get to you so late!  
Are you still experiencing this issue?

If so, make sure that you have the proper permissions in your account, not only that you have the Server-to-Server Oauth app enabled in your account, but that you have the proper permissions enabled under User and Permission management

Hope this helps  
Elisa

---

<div class="post-metadata">

**Author:** ![jferguson](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jferguson/32/9015_2.png) [@jferguson](https://devforum.zoom.us/u/jferguson)\
**Post date:** [August 26, 2022, 3:55pm UTC](https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557/3 "2022-08-26T15:55:56Z")

</div>

I am still having the issue. No worries on the response.

What specific permission do I need to look for? My role is OwnerSecondary so I believe my own account has pretty much everything. I have no problem deleting a user from the web portal. The only thing that’s not set under “User and Permission management” is “Bulk delete, unlink, and deactivate”. Would this be considered a bulk delete?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 29, 2022, 7:05pm UTC](https://devforum.zoom.us/t/unable-to-delete-account-using-new-server-to-server-oauth-app/74557/4 "2022-08-29T19:05:24Z")

</div>

Hi @jferguson  
Interesting, I just did a little testing on my end and I was not able to replicate this issue.  
I am going to send you a private message and in that message could you please share with me the email associated with your account as well as the appID or the name of the app that you are using to make this API call so I can look into this further?  
Best,  
Elisa
