Search + K

Command Palette

Search for a command to run...

Sign In

Remove a user from a workspace or organization

POST /workspaces/{workspace_gid}/removeUser
Copy endpoint
https://app.asana.com/api/1.0

Remove a user from a workspace or organization.

The user making this call must be an admin in the workspace. The user can be referenced by their globally unique user ID or their email address.

When invoked using a Service Account Token (SAT), this endpoint follows the same behavior as the SCIM API Delete endpoint. To learn more about how Asana handles user deprovisioning, refer to our Help Center article on deprovisioning users.

When invoked using a Personal Access Token (PAT), the endpoint behaves similarly, except that ownership of the user’s resources is transferred to the PAT owner instead of the admin specified in the Admin Console.

Note: If you wish to retain access to a user’s private resources (i.e., those visible only to that user), you have to make them public manually (or ask the user to do so) before removal.

Returns an empty data record.

Parameters

path Path Parameters

Name Type
workspace_gid required

Globally unique identifier for the workspace or organization.

string

query Query Parameters

Name Type
opt_pretty

Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging.

boolean

Request Body

application/json required

The user to remove from the workspace.

{ data?: WorkspaceRemoveUserRequest

A user identification object for specification with the addUser/removeUser endpoints.

interface WorkspaceRemoveUserRequest {
user?: string;
}
; }

Responses

200 application/json

The user was removed successfully to the workspace or organization.

{ data?: EmptyResponse

An empty object. Some endpoints do not return an object on success. The success is conveyed through a 2-- status code and returning an empty object.

interface EmptyResponse {}
; }

Client Errors

400 application/json

This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
401 application/json

A valid authentication token was not provided with the request, so the API could not associate a user with the request.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
403 application/json

The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}
404 application/json

Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}

Server Errors

500 application/json

There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.

interface ErrorResponse {
errors?: Error
interface Error {
message?: string;
help?: string;
phrase?: string;
}
[]
;
}