bitwarden/server · error · BadRequestException
You cannot purge accounts owned by an organization. Contact
Error message
You cannot purge accounts owned by an organization. Contact your admin for additional details.
What it means
Error "You cannot purge accounts owned by an organization. Contact your admin for additional details." thrown in bitwarden/server.
Source
Thrown at src/Api/Vault/Controllers/CiphersController.cs:1302
var user = await _userService.GetUserByPrincipalAsync(User);
if (user == null)
{
throw new UnauthorizedAccessException();
}
if (!await _userService.VerifySecretAsync(user, model.Secret))
{
ModelState.AddModelError(string.Empty, "User verification failed.");
await Task.Delay(2000);
throw new BadRequestException(ModelState);
}
if (organizationId == null)
{
// Check if the user is claimed by any organization.
if (await _userService.IsClaimedByAnyOrganizationAsync(user.Id))
{
throw new BadRequestException(new CannotPurgeClaimedAccountError().Message);
}
await _cipherRepository.DeleteByUserIdAsync(user.Id);
}
else
{
if (!await _currentContext.EditAnyCollection(organizationId!.Value))
{
throw new NotFoundException();
}
await _cipherService.PurgeAsync(organizationId!.Value);
}
}
[HttpPost("{id}/attachment/v2")]
public async Task<AttachmentUploadDataResponseModel> PostAttachment(Guid id, [FromBody] AttachmentRequestModel request)
{
var user = await _userService.GetUserByPrincipalAsync(User);
var cipher = request.AdminRequest ?View on GitHub (pinned to e93b962371)
Solutions
- Ask an organization owner to remove your account from the organization before purging the vault.
- Contact your admin for assistance releasing the claimed account, then retry the purge.
When it happens
Trigger: Thrown when a user attempts to purge a vault for an account that is owned/claimed by an organization; purging such accounts is restricted and must go through the organization admin.
Common situations: See trigger scenarios.
AI-assisted analysis of bitwarden/server@e93b962371 (2026-08-13).
Data as JSON: /api/errors/deb01e37af97be60.
Report an issue: GitHub.