Skip to main content

Delete a user

DELETE 

/users/:username

Deletes a user outright. There is no soft delete, no archive and no undo, and re-creating the same username afterwards produces a new user with a new id.

The one guard is a check for AWS access. If the user has any permission set assignment made directly to them, the deletion is refused with a 409 and nothing is removed. Clear the assignments with DELETE /permission-set-assignments/{id} first and retry.

That guard has two edges worth knowing before you rely on it:

  • It counts direct assignments only. Access the user holds through a group does not block the deletion: the user disappears while the group assignment stays behind, still granting the role to everyone else in the group.
  • It matches on the exact value in the path. Deleting the user by email address looks up assignments under that email, finds none because they are recorded against the username, and deletes the user with their AWS access unchecked. Always delete by username.

Nothing else is cleaned up. Custom application assignments, portal access records and Just-In-Time history that reference this user are all left in place, pointing at someone who no longer exists.

The operation is not idempotent: a second DELETE of the same user returns 404. It answers 200 with a body, not 204, and that body echoes the username rather than the deleted user. Fetch the user first if you want a copy of it.

Request​

Responses​

The user was deleted.