{"record":{"id":"febc9a1d873e55d8","repo":"bitwarden/server","slug":"master-password-reset-is-required-but-not-provide","errorCode":null,"errorMessage":"Master Password reset is required, but not provided.","messagePattern":"Master Password reset is required, but not provided\\.","errorType":"http","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"src/Api/AdminConsole/Controllers/OrganizationUsersController.cs","lineNumber":371,"sourceCode":"    {\n        var user = await _userService.GetUserByPrincipalAsync(User);\n        if (user == null)\n        {\n            throw new UnauthorizedAccessException();\n        }\n\n        var organizationUser = await _organizationUserRepository.GetByIdAsync(organizationUserId);\n        if (organizationUser == null || organizationUser.OrganizationId != orgId)\n        {\n            throw new NotFoundException(\"Organization user mismatch\");\n        }\n\n        var autoEnrollEnabled = (await _policyRequirementQuery.GetAsync<ResetPasswordPolicyRequirement>(user.Id))\n            .AutoEnrollEnabled(orgId);\n\n        if (autoEnrollEnabled && !OrganizationUser.IsValidResetPasswordKey(model.ResetPasswordKey))\n        {\n            throw new BadRequestException(\"Master Password reset is required, but not provided.\");\n        }\n\n        await _acceptOrgUserCommand.AcceptOrgUserByEmailTokenAsync(organizationUserId, user, model.Token, _userService);\n\n        if (autoEnrollEnabled)\n        {\n            await _updateUserResetPasswordEnrollmentCommand.UpdateUserResetPasswordEnrollmentAsync(orgId, user.Id, model.ResetPasswordKey, user.Id);\n        }\n    }\n\n    [HttpPost(\"{id}/confirm\")]\n    [Authorize<ManageUsersRequirement>]\n    public async Task Confirm(Guid orgId, Guid id, [FromBody] OrganizationUserConfirmRequestModel model)\n    {\n        var userId = _userService.GetProperUserId(User);\n        _ = await _confirmOrganizationUserCommand.ConfirmUserAsync(orgId, id, model.Key, userId.Value, model.DefaultUserCollectionName);\n    }\n","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/src/Api/AdminConsole/Controllers/OrganizationUsersController.cs#L353-L389","documentation":"Error \"Master Password reset is required, but not provided.\" thrown in bitwarden/server.","triggerScenarios":"Thrown when an admin-initiated account recovery requires a master password reset for the target user but the request does not include the new master password hash.","commonSituations":"See trigger scenarios.","solutions":["Include the MasterPasswordHash (or the reset password key) in the request when performing a master password reset.","Use the client workflow for admin password reset, which supplies the required reset payload automatically."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}