ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED - 8645 (0x21C5)

The undelete operation failed because the Sam Account Name or Additional Sam Account Name of the object being undeleted conflicts with an existing live object.

Updated: Feb 21, 2026

Technical Background

The ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED error code is encountered during the process of undeleting objects in a Windows environment. This error specifically pertains to issues related to the Security Accounts Manager (SAM) database, which stores user and group account information.

Error Details

This error occurs when an attempt to undelete an object results in a conflict with another live object within the SAM database. The conflict is identified based on either the Sam Account Name or Additional Sam Account Name of the object being undeleted. This indicates that there are already existing objects with these names, preventing the undeletion process from proceeding.

Common Causes

  • Invalid Parameter Values: Incorrectly specified Sam Account Name or Additional Sam Account Name during the undelete operation.
  • Incorrect Object Type: The undelete operation was attempted on an object type other than a user or group account.
  • Exceeding Limits: Attempted to perform an undelete operation that exceeds system-defined limits, such as maximum number of concurrent operations.

Real-World Context

In practical scenarios, this error might occur when administrators attempt to recover deleted user accounts or groups. If the undeleted object's name conflicts with another live object, the operation will fail, leading to this specific error code being returned.

Is This Error Critical?

The criticality of this error depends on the context in which it occurs. While not necessarily a system-wide failure, it can prevent important administrative tasks from completing successfully, such as restoring user accounts or group memberships.

How to Diagnose

To diagnose this issue, follow these steps:

  1. Review Operation Context: Ensure that the undelete operation is being performed on the correct type of object (user or group account).
  2. Validate Parameters: Double-check the Sam Account Name and Additional Sam Account Name used in the operation to ensure they are accurate.
  3. Confirm Object Types: Verify that no other live objects exist with the same names before attempting the undelete operation.
  4. Check Limits or Constraints: Ensure that the system has not reached any operational limits, such as maximum concurrent operations.

How to Resolve

To resolve this issue, consider these practical steps:

  1. Correct Parameter Usage: Use accurate and unique Sam Account Names for all objects involved in the operation.
  2. Adjust Operation Context: If necessary, adjust the context of the undelete operation to avoid conflicts with existing live objects.
  3. Restore Data: If data corruption is suspected, restore from a backup if available.
  4. Retry Operation with Valid Inputs: Attempt the undelete operation again using valid and non-conflicting input parameters.

Developer Notes

Developers should be aware that this error can impact administrative tasks in Windows environments. Proper validation of Sam Account Names and Additional Sam Account Names is crucial to avoid such conflicts during operations like undeletion.

Related Errors

  • ERROR_DS_OBJECT_NOT_FOUND: Indicates the object being undeleted does not exist.
  • ERROR_DS_DRA_SCHEMA_CONFLICT: Conflicts related to schema changes in Active Directory.

FAQ

Q: What causes this error?

A: This error typically occurs due to a conflict with existing live objects in terms of Sam Account Name or Additional Sam Account Name during an undelete operation.

Q: How can I prevent this error from occurring?

A: Ensure that the Sam Account Names and Additional Sam Account Names used are unique and accurately reflect the intended object being operated on.

Summary

The ERROR_DS_UNDELETE_SAM_VALIDATION_FAILED error code indicates a conflict during an undelete operation in the SAM database. Proper validation of input parameters and ensuring no conflicts with existing live objects can help prevent this issue from occurring.