| Previous | Next |
| hrMissingExpiryToken | hrContentsExpired |
hrUnknownExpiryTokenFormat
Why this result matters
For hrUnknownExpiryTokenFormat, treat the value as part of a state machine: it says what remained valid and what did not. The decisive boundary is bytes were supplied as an expiry token but the Directory Service cannot parse their format.
The stored Value is 0xC7FF0010 (facility-specific HRESULT). The HRESULT carries failure severity, so output state must be treated according to the individual API contract. The legacy this result name comes from the Windows Directory Service backup/restore message header.
The first useful distinction is that this is format corruption or mismatch, whereas hrMissingExpiryToken means no token was supplied. Start by record token length, backup-set identifier, storage encoding, copy path, and whether text conversion or truncation altered the opaque bytes. That separates a reproducible incident from a later generic cleanup or service error.
Do not confuse it with
This result specifically means that this is format corruption or mismatch, whereas hrMissingExpiryToken means no token was supplied. Related values below can appear in the same workflow but require a different response:
hrMissingExpiryToken | the restore request lacks the expiry token created with the backup set |
|---|---|
hrContentsExpired | the Directory Service judged the backup contents too old under the expiry information associated with the set |
hrInvalidBackupSequence | backup APIs were called in an order that violates the ESE external-backup state machine |
Keep the original constant and hexadecimal value in telemetry. Replacing this result with “backup failed” or “database warning” removes the state information needed to select the next legal API call.
Forensic checklist
Preserve the first result before retries, cleanup, service restart, or file replacement changes the evidence. The diagnostic record should identify the exact API phase and the owner of every handle or artifact involved.
- Code-specific observation: record token length, backup-set identifier, storage encoding, copy path, and whether text conversion or truncation altered the opaque bytes.
- Storage/copy transformations: record it together with it and the timestamp of the first occurrence.
- Restore preparation parameters: record it together with it and the timestamp of the first occurrence.
- Token byte length and hash: record it together with it and the timestamp of the first occurrence.
- Backup-set identifier: record it together with it and the timestamp of the first occurrence.
Use hashes, lengths, IDs, generation numbers, and redacted samples instead of copying directory contents or sensitive database values into routine logs. For this it investigation, a complete provenance chain is often more useful than a second automatic retry.
Objects and state involved
| Diagnostic layer | the opaque expiry token linking a legacy AD backup set to restore authorization and freshness |
|---|---|
| Relevant API surface | DsBackupPrepare token output and DsRestorePrepare token input |
| Code-specific boundary | bytes were supplied as an expiry token but the Directory Service cannot parse their format |
| Narrow corrective direction | retrieve the unmodified binary token from the same backup set and pass its exact byte count |
The token must be stored as opaque binary data with the backup set., without a token, DsRestorePrepare returns a restricted context usable only to query restore locations.
Actions that can make diagnosis worse
- do not convert the token through text encoding.
- do not borrow a token from another backup set.
- do not discard the first lower-level Win32, RPC, or JET result merely because a later cleanup call returned a more familiar error.
Validation after correction
- Record it,
0xC7FF0010, the API name, the current phase, and all live context or file owners. - Verify the decisive condition by record token length, backup-set identifier, storage encoding, copy path, and whether text conversion or truncation altered the opaque bytes.
- Apply only the narrow correction: retrieve the unmodified binary token from the same backup set and pass its exact byte count.
- After it, recreate any context invalidated by the failure; do not carry stale HBC, cursor, file, or restore-map state into the retry.
- repeat the smallest non-destructive test that reaches the same boundary, then verify both the return value and the resulting file, cursor, backup, or database state.
Acceptance criteria for a fix
A useful regression test for this HRESULT should force the condition “bytes were supplied as an expiry token but the Directory Service cannot parse their format”, call one documented API transition, and assert the exact HRESULT. The corrected the case should change only the decisive precondition and should verify cleanup as well as the primary output. For the result backup or restore path, also prove that the resulting set can be enumerated and that no file handle or context remains active after finalization.
Technical references
- DsRestorePrepare token rules — API ordering, file semantics, warning/error interpretation, or recovery behavior relevant to it.
- AD backup walkthrough
- AD restore walkthrough
- Microsoft list of AD DS backup errors
Looking for a different code? Search another status or error code.
