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.
Note: This feature is available to Enterprise plans only. You must be the root admin 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 |
|
User account ID for the current owner. |
|
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
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 |
|
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
.