# Asana: User deletion failed

**URL:** <https://forum.asana.com/t/asana-user-deletion-failed/57540>\
**Category:** API & Developers\
**Created:** [13 August 2019 06:00 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540 "2019-08-13T06:00:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Parashuram\_Joshi](https://luna1.co/8d76cd.png) [@Parashuram\_Joshi](https://forum.asana.com/u/Parashuram_Joshi)\
**Post date:** [13 August 2019 06:00 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540/1 "2019-08-13T06:00:20Z")

</div>

Hi Team,

User creation failed using the user management APIs for one of our mutual customer, Spin, with the following error message:

This can only be done by a workspace administrator.  
Is there an endpoint that we can use to check whether the connected account is a workspace admin or not? We are using the documentation available at [Build an app with Asana](https://asana.com/developers/api-reference/workspaces).

Request ( Timestamp: [2019-07-27 05:02:02,222])

curl -X POST -H “Connection: keep-alive” -H “Accept-Encoding: gzip, deflate” -H “Accept: _/_” -H “User-Agent: python-requests/2.15.1” -H “Authorization: Bearer Token” -H “Content-Length: 37” -d ‘{“data”: {“user”: “963857764184727”}}’ ‘[https://app.asana.com/api/1.0/workspaces/297627858353593/removeUser](https://app.asana.com/api/1.0/workspaces/297627858353593/removeUser)’

**Response** :

{  
u’error’: u’admin\_only’,  
u’help’: u’For more information on API status codes and how to handle them, read the docs on ’  
u’message’: u’Call restricted to workspace admins’,  
u’user\_message’: u’This can only be done by a workspace administrator.’  
}

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [13 August 2019 12:52 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540/2 "2019-08-13T12:52:49Z")

</div>

Hi @Parashuram_Joshi and welcome to the forum,

Yes, you should be able to get the Workspace Memberships for that user and look at the `is_admin` property; see:

> **[Build an app with Asana](https://developers.asana.com/docs#asana-workspace-memberships)**
>
> Learn the basics of Asana's developer platform

(FYI this endpoint was just added a few days ago, so good timing on your question!)

---

<div class="post-metadata">

**Author:** ![Parashuram\_Joshi](https://luna1.co/8d76cd.png) [@Parashuram\_Joshi](https://forum.asana.com/u/Parashuram_Joshi)\
**Post date:** [20 August 2019 15:16 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540/3 "2019-08-20T15:16:56Z")

</div>

Thanks phil,  
I am not getting is\_admin and is\_active fields in the response for an endpoint mentioned here.

> **[Build an app with Asana](https://developers.asana.com/docs#asana-workspace-memberships)**
>
> Learn the basics of Asana's developer platform

Do we need to pass any param to fetch all details of workspace\_membership object?

---

<div class="post-metadata">

**Author:** ![Phil\_Seeman](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/phil_seeman/32/81525_2.png) [@Phil\_Seeman](https://forum.asana.com/u/Phil_Seeman)\
**Post date:** [20 August 2019 15:34 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540/4 "2019-08-20T15:34:41Z")

</div>

> [@Parashuram\_Joshi](#):
>
> Do we need to pass any param to fetch all details of workspace\_membership object?

Yes, as it says in the documentation, that endpoint returns “the compact workspace membership records” - **compact** being the key word. In Asana terms, that means by default Asana just gives you the basic info (for performance reasons) and you’ll need to “opt in” to get the other fields. To do that, include `opt_fields=is_active, is_admin` in your query.

You can read all about opting in and `opt_fields` here:

> **[Build an app with Asana](https://developers.asana.com/docs#input-output-options)**
>
> Learn the basics of Asana's developer platform

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/asana/user_avatar/forum.asana.com/system/32/276370_2.png) [@system](https://forum.asana.com/u/system)\
**Post date:** [30 May 2025 19:07 UTC](https://forum.asana.com/t/asana-user-deletion-failed/57540/5 "2025-05-30T19:07:41Z")

</div>

Closed on 30 May 2025 19:07 UTC


