Automate the removal of team user accounts

When a user leaves the organization, you can automate the removal of their user account using the AppSheet API to transfer app ownership and delete the user account as described in the following sections.

Notes:
  • Teams are supported for Enterprise accounts only.
  • You must have team root permissions to use the APIs and be on the same team as the referenced user accounts.

Transfer app ownership

To transfer ownership of all apps owned by a user account to another user account within a team issue a POST request to the following API:

https://www.appsheet.com/api/v2/admin/apps/transferall?oldOwnerId=id&newOwnerId=id

Query parameters

You must pass the following as query parameters:

Query parameter

Description

oldOwnerId

User account ID for the current owner.

newOwnerId

User account ID to which you want to assign all apps.

Note: The users must be members of the same team.

Headers

You must pass the AccessKey and UserId headers, as described in Manage and monitor your team using the API.

Example

For example:

curl https://www.appsheet.com/api/v2/admin/apps/transferall?oldOwnerId=14853665&newOwnerId=14853667 \
  
-X POST \
  -H "AccessKey: DcTx1-TFq3c-7ka6t-PcnnI-7d0dO-M4wTm-vWwx0-1KBte" \
  -H "UserId: 1234567"

If successful, the API call returns 200 OK.

Delete the user account

Note: Deleting a user account is permanent and non-recoverable. If you do not want to delete the apps owned by this account, transfer them before deleting the account.

To delete a user account issue a POST request to the following API:

https://www.appsheet.com/api/v2/admin/users/delete?userId=id

Query parameter

You must pass the following as query parameters:

Query parameter

Description

userId

User account ID that you want to delete.

Headers

You must pass the AccessKey and UserId headers, as described in Manage and monitor your team using the API.

Example

For example:

curl https://www.appsheet.com/api/v2/admin/users/delete?userId=14853665 \
  -X POST \
  -H "AccessKey: DcTx1-TFq3c-7ka6t-PcnnI-7d0dO-M4wTm-vWwx0-1KBte"
  -H "UserId: 1234567"

If successful, the API call returns 200 OK.

Was this helpful?
How can we improve it?

Need more help?

Try these next steps:

Search
Clear search
Close search
Google apps
Main menu
Search Help Center
false
false
false
false