| Previous | Next |
| TPM_E_BADCONTEXT | TPM_E_MA_TICKET_SIGNATURE |
TPM_E_TOOMANYCONTEXTS
The protocol checkpoint
TPM_E_TOOMANYCONTEXTS (0x8028005B) belongs to TPM 1.2 resources, delegation and contexts. The base What Is page already shows the short Windows message; the additional diagnostic value is that this result marks the TPM 1.2 device is already holding the maximum number of saved contexts for the relevant operation.
Nearest useful distinction: This value corresponds to “Too many contexts held by the TPM.” Keep that condition separate from adjacent errors that may expose the same high-level symptom.
The first producer to identify for this HRESULT is the TPM resource, context or delegation manager, sometimes mediated by TBS virtualization. TBS can virtualize finite TPM resources, but a saved TPM context and a TBS virtual handle are not durable application IDs. Their validity depends on resource type, owning client context, TPM lifecycle and the exact save/load history.
The result value 0x8028005B should remain attached to the symbolic name. Some this result logs store the value as a negative signed integer; others expose only a generic CNG, WMI, BitLocker or enrollment message. Neither substitution identifies the TPM 1.2 device is already holding the maximum number of saved contexts for the relevant operation as precisely as it.
What to preserve before retrying
- Producer for this HRESULT: the TPM resource, context or delegation manager, sometimes mediated by TBS virtualization.
- Rejected invariant: the TPM 1.2 device is already holding the maximum number of saved contexts for the relevant operation.
- Decisive capture: number and type of active/saved contexts, owning processes, abandoned sessions, TBS context count, and cleanup behavior.
- Safe comparison: close a known test context and verify that one new context can then be created.
Minimal reproduction
Build the result minimal case around the original command contract. Use a disposable object when the request can write NV data, advance a counter, change authorization state or consume a lock transition. The comparison is valid only when the caller, TPM generation and security policy remain the same.
| Question | Evidence for this HRESULT |
|---|---|
| What exact state was rejected? | the TPM 1.2 device is already holding the maximum number of saved contexts for the relevant operation |
| Which layer owns the result? | The TPM resource, context or delegation manager, sometimes mediated by TBS virtualization. |
| What must be correlated? | number and type of active/saved contexts, owning processes, abandoned sessions, TBS context count, and cleanup behavior |
| What is the controlled comparison? | close a known test context and verify that one new context can then be created |
Nearby codes with different meanings
| Constant | Checkpoint represented by its standard message |
|---|---|
TPM_E_NOCONTEXTSPACE | There is no room in the context list for additional contexts — a separate checkpoint when compared with this result. |
TPM_E_BADCONTEXT | The context blob is invalid — a separate checkpoint when compared with this result. |
TPM_E_BAD_DELEGATE | Delegation is not correct — a separate checkpoint when compared with it. |
The codes above may appear in the same workflow, but they are not aliases. TPM_E_NOCONTEXTSPACE reports lack of room in the context list, a closely related but distinct storage boundary.
Resolution criteria
Close or flush unused contexts and redesign long-lived handle caching; do not increase application concurrency blindly. Do not persist volatile TPM or TBS handles as durable identifiers. A numeric handle can be valid only inside the creating context and lifecycle, even when its value looks unchanged after restart.
Proof for this HRESULT consists of a successful replay plus validation of the intended key, PCR, NV, context, event-log, provider or service result. A software fallback or a newly provisioned blank TPM answers a different question than it.
Source material
- Microsoft: Resource Virtualization in TBS — source for the checkpoint.
- Microsoft: Command Scheduling in TBS — source for the checkpoint.
- Microsoft: Using TPM Base Services — source for the checkpoint.
- TCG: TPM 1.2 Part 3 — Context commands — source for the checkpoint.
Looking for a different code? Search another status or error code.