Skip to main content
Version: 1.28 (Current)

Delete User

Audience: Low-code Engineers

Skill Prerequisites: Actions, User management

Deletes every user in the context's list of users. Add users to the list with Load User or Load Users from SQL first.

The list starts empty, so if nothing was loaded, nothing is deleted. The current user isn't deleted unless they're in the list.

By default, the user is deleted from the current portal but stays in the database, marked as deleted. With Hard Delete checked, the user is removed from the database completely.

caution

This action deletes every user in the list, without asking. A hard delete can't be undone. In a form, put it on a button that asks for confirmation. In a Listing, enable Ask For Confirmation.

Typical Use Cases​

  • Let a user delete their own account
  • Let an administrator delete users picked in a Listing
  • Clean up old or unconfirmed accounts in a scheduled job, with Load Users from SQL

Don't use it to​

Action NameDescription
Load UserLoads users into the list and makes the last one the current user.
Load Users from SQLAdds the users returned by a SQL query to the list.
Unauthorize UserStops users from logging in without deleting them.
Revoke User RoleRemoves roles from users.
Change UserChanges the current user. It doesn't add the user to the list, so it doesn't affect this action.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
Hard DeleteCheck it to remove the users from the database completely. Leave it unchecked to delete them from the current portal only, and keep them in the database marked as deleted.NofalseNo

Output Parameters Reference​

This action has no output parameters.

Considerations​

  • There's no permission check in the action. Anyone who can run it can delete the users in the list. Only put it where you control who runs it, and don't load users from values a user can change, such as a user ID in the query string, without checking they're allowed.
  • Check who's in the list. Every user loaded in the same run is deleted, including users from an earlier Load User. Test a Load Users from SQL query first, for example in the SQL Console.
  • Change User doesn't count. A user set with Change User isn't in the list, so it isn't deleted.
  • Soft-deleted users keep their username. Without Hard Delete, the account stays in the database, so its username and email may not be available for a new account.
  • No email is sent. The user isn't notified.
  • Nothing to delete, no error. If the list is empty, the action does nothing.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Let a user delete their own account​

These actions load the logged-in user and delete them from the current portal. Put them on a button that asks for confirmation.

{
"Title": "Load User",
"ActionType": "LoadUser",
"Description": "Load the logged-in user",
"Parameters": {
"Id": "[User:UserID]",
"Portal": ""
}
}
{
"Title": "Delete User",
"ActionType": "DeleteUser",
"Description": "Delete the logged-in user",
"Parameters": {
"HardDelete": false
}
}

2. Permanently delete a selected user​

These actions load the user whose ID is in the UserId token, then remove that user from the database. The condition makes sure the user was found.

{
"Title": "Load User",
"ActionType": "LoadUser",
"Description": "Load the user to delete",
"Parameters": {
"Id": "[UserId]",
"Portal": ""
}
}
{
"Title": "Delete User",
"ActionType": "DeleteUser",
"Description": "Permanently delete the loaded user",
"Condition": "\"[User:UserID]\" == \"[UserId]\"",
"Parameters": {
"HardDelete": true
}
}

Revised 09/28/2026