bitwarden/server · error · BadRequestException

Ciphers were not unarchived. Ensure the provided ID is corre

Error message

Ciphers were not unarchived. Ensure the provided ID is correct and you have permission to archive it.

What it means

Error "Ciphers were not unarchived. Ensure the provided ID is correct and you have permission to archive it." thrown in bitwarden/server.

Source

Thrown at src/Api/Vault/Controllers/CiphersController.cs:1120

    [HttpPut("unarchive")]
    public async Task<ListResponseModel<CipherResponseModel>> PutUnarchiveMany([FromBody] CipherBulkUnarchiveRequestModel model)
    {
        if (!_globalSettings.SelfHosted && model.Ids.Count() > 500)
        {
            throw new BadRequestException("You can only unarchive up to 500 items at a time.");
        }

        var userId = _userService.GetProperUserId(User).Value;
        var user = await _userService.GetUserByPrincipalAsync(User);

        var cipherIdsToUnarchive = new HashSet<Guid>(model.Ids);

        var unarchivedCipherOrganizationDetails = await _unarchiveCiphersCommand.UnarchiveManyAsync(cipherIdsToUnarchive, userId);

        if (unarchivedCipherOrganizationDetails.Count == 0)
        {
            throw new BadRequestException("Ciphers were not unarchived. Ensure the provided ID is correct and you have permission to archive it.");
        }

        var organizationAbilities = await GetOrganizationAbilitiesAsync(unarchivedCipherOrganizationDetails);
        var responses = unarchivedCipherOrganizationDetails.Select(cipher =>
            new CipherResponseModel(cipher, user, GetOrganizationAbility(cipher, organizationAbilities), _globalSettings)).ToArray();

        return new ListResponseModel<CipherResponseModel>(responses);
    }

    [HttpPut("{id}/restore")]
    public async Task<CipherResponseModel> PutRestore(Guid id)
    {
        var user = await _userService.GetUserByPrincipalAsync(User);
        var cipher = await GetByIdAsync(id, user.Id);
        if (cipher == null)
        {
            throw new NotFoundException();
        }

View on GitHub (pinned to e93b962371)

Solutions

  1. Verify the cipher IDs are correct and belong to your vault or a collection you can manage.
  2. Re-sync the vault, then retry the unarchive with the current IDs.
  3. Confirm you have edit/manage permission on the collection containing the items.

When it happens

Trigger: Thrown when a bulk unarchive request completes without unarchiving any ciphers, because none of the supplied IDs matched archived ciphers the user has permission to modify.

Common situations: See trigger scenarios.


AI-assisted analysis of bitwarden/server@e93b962371 (2026-08-13). Data as JSON: /api/errors/b18de4d5901249c3. Report an issue: GitHub.