| Previous | Next |
| ERROR_DS_SRC_AND_DST_OBJECT_CLASS_MISMATCH | ERROR_DS_DRA_SCHEMA_INFO_SHIP |
ERROR_SAM_INIT_FAILURE
Security Accounts Manager initialization failed because of the following error: %1. Error Status: 0x%2. Click OK to shut down the system and reboot into Safe Mode. Check the event log for detailed information.
Windows assigns decimal 8541 and hexadecimal 0x0000215D to ERROR_SAM_INIT_FAILURE. For ERROR_SAM_INIT_FAILURE, the decisive subject is initialization of the Security Accounts Manager; the value alone does not reveal which object, server, file, session, or transition failed.
The native value for ERROR_SAM_INIT_FAILURE is 8541 (0x0000215D). Preserve ERROR_SAM_INIT_FAILURE immediately after the failing Windows call because later logging, cleanup, LDAP, RPC, or file operations can replace the last-error value.
Where this result appears
- For
ERROR_SAM_INIT_FAILURE, processing initialization of the Security Accounts Manager. - For
ERROR_SAM_INIT_FAILURE, executing an LDAP, RPC, deployment, replication, or directory-management operation. - For
ERROR_SAM_INIT_FAILURE, working against a specific domain controller whose replica and schema state affect the result. - For
ERROR_SAM_INIT_FAILURE, translating extended directory diagnostics into a Win32 error for an application or administration tool.
State boundary to prove
ERROR_SAM_INIT_FAILURE applies to initialization of the Security Accounts Manager and does not by itself prove that the entire server, directory, disk, session, or application is unavailable. The state boundary to prove for ERROR_SAM_INIT_FAILURE is whether SAM can open its protected database, obtain boot-key material, validate logs, and initialize required security state. Use the embedded status reported with the error, System and Security events, and SAM/registry storage health as independent evidence. When evidence for ERROR_SAM_INIT_FAILURE disagrees, preserve timestamps and investigate the transition instead of selecting the most convenient value.
Likely causes
- For
ERROR_SAM_INIT_FAILURE, SAM database or transaction logs are corrupt. - For
ERROR_SAM_INIT_FAILURE, boot-key retrieval failed. - For
ERROR_SAM_INIT_FAILURE, storage or registry access failed. - For
ERROR_SAM_INIT_FAILURE, security subsystem initialization returned a detailed status. - For
ERROR_SAM_INIT_FAILURE, unsupported restore or cloning damaged machine identity.
Diagnostic sequence
- For
ERROR_SAM_INIT_FAILURE, capture error 8541 immediately at the API boundary and record the operation that was attempted. - For
ERROR_SAM_INIT_FAILURE, identify the exact owner of initialization of the Security Accounts Manager, including object generation, server, path, session, replica, or client context. - For
ERROR_SAM_INIT_FAILURE, collect the embedded status reported with the error before restarting a service or changing configuration. - For
ERROR_SAM_INIT_FAILURE, compare System and Security events with the documented or observed precondition. - For
ERROR_SAM_INIT_FAILURE, correlate SAM/registry storage health with the Directory Service event log, LDAP extended diagnostics, replication metadata, dcdiag and repadmin output, and the calling application’s request trace. - For
ERROR_SAM_INIT_FAILURE, determine whether side effects occurred and verify recovery after changing one responsible condition.
Evidence to collect
- For
ERROR_SAM_INIT_FAILURE, the embedded status reported with the error. - For
ERROR_SAM_INIT_FAILURE, System and Security events. - For
ERROR_SAM_INIT_FAILURE, SAM/registry storage health. - For
ERROR_SAM_INIT_FAILURE, recent restore, cloning, or servicing actions. - For
ERROR_SAM_INIT_FAILURE, Safe Mode or recovery behavior.
Correlate ERROR_SAM_INIT_FAILURE with the Directory Service event log, LDAP extended diagnostics, replication metadata, dcdiag and repadmin output, and the calling application’s request trace. Keep the first detailed status even when a later wrapper translates it to error 8541; the first status often distinguishes transport, authorization, storage, schema, state, and application-integrity causes that share the same final Win32 result.
Handling, retry, and recovery
For ERROR_SAM_INIT_FAILURE, the recovery objective is to preserve the detailed status, use supported system-state recovery or repair, and avoid replacing SAM files independently of their registry and key material.
Retry ERROR_SAM_INIT_FAILURE only after the recorded condition changes and completion state is known. For ERROR_SAM_INIT_FAILURE, idempotent queries may be repeated after recovery, but mutations require a state check first; backoff cannot repair malformed input, corruption, missing structure, or policy rejection.
Telemetry and support fields
- For
ERROR_SAM_INIT_FAILURE, recordsam_init_failure_apifor the producing function or management operation. - For
ERROR_SAM_INIT_FAILURE, recordsam_init_failure_targetfor the file, log, session, replica, object, or server identity. - For
ERROR_SAM_INIT_FAILURE, recordsam_init_failure_state_beforeandsam_init_failure_requested_transition. - For
ERROR_SAM_INIT_FAILURE, recordsam_init_failure_first_statusfor the earliest lower-level diagnostic.
For support escalation involving ERROR_SAM_INIT_FAILURE, retain decimal 8541, hexadecimal 0x0000215D, the API, UTC time, target identity, and first subsystem-specific status. For ERROR_SAM_INIT_FAILURE, include the smallest reproducible request and evidence that distinguishes this condition from nearby codes. In the context of ERROR_SAM_INIT_FAILURE, many ds codes are internal or management-facing and are not tied to one public function. the producing ldap, rpc, deployment, or management api must therefore be recorded with the code.
Difference from nearby results
For ERROR_SAM_INIT_FAILURE, ERROR_DS_SAM_NEED_BOOTKEY_PASSWORD and FLOPPY request specific startup material; this code means SAM initialization failed more broadly
Practical validation scenario
A cloned legacy system starts with inconsistent SAM and registry state. The detailed status and system-state history show that a coordinated restore is required. The negative test should preserve the responsible condition and reproduce ERROR_SAM_INIT_FAILURE; the recovery test should change only the identified cause, repeat the same operation, and verify both success and the absence of an unintended partial side effect.
Developer and administrator guidance
Administrators handling ERROR_SAM_INIT_FAILURE should preserve Directory Service events, replication metadata, and the contacted domain controller before changing objects or forcing role transitions. For ERROR_SAM_INIT_FAILURE, developers should retain LDAP extended diagnostics and object identities across wrappers so the Win32 code does not erase the actionable directory result. Code that exposes ERROR_SAM_INIT_FAILURE through RPC, JSON, REST, PowerShell, or another protocol should preserve the Win32 domain, decimal 8541, hexadecimal 0x0000215D, and original component diagnostic.
References
- Microsoft: Win32 system error range containing this code — official context relevant to
ERROR_SAM_INIT_FAILURE. - Microsoft: AD DS troubleshooting — official context relevant to
ERROR_SAM_INIT_FAILURE. - Microsoft: repadmin — official context relevant to
ERROR_SAM_INIT_FAILURE. - Microsoft: dcdiag — official context relevant to
ERROR_SAM_INIT_FAILURE. - Microsoft: AD and LDS diagnostic event logging — official context relevant to
ERROR_SAM_INIT_FAILURE.
Looking for a different code? Search another status or error code.