What does HRESULT 0x8001012D (CO_E_INVALIDSID) mean?

 
Previous Next
CO_E_WRONGTRUSTEENAMESYNTAX CO_E_CONVERSIONFAILED

CO_E_INVALIDSID

A supplied security identifier is invalid

CO_E_INVALIDSID is HRESULT 2147549485 (0x8001012D) from winerror.h. The documented description is “One of the security identifiers provided by the user was invalid.” The relevant context is the COM IAccessControl, DCOM client identity, trustee translation, token inspection, security descriptor, ACL, or serialization workflow.

Where it is encountered

  • IAccessControl initialization, access checks, owner/trustee processing, and serialized ACL persistence.
  • Server-side DCOM impersonation, client blanket inspection, token and SID lookup.
  • Security descriptor construction, DACL canonicalization, file-backed policy storage, or legacy NetAccess migration.

The immediate focus is an ACL, trustee, token, or serialized access-control structure containing a SID that fails structural validation.

What to verify

Verify that SID length, revision, subauthority count, memory extent, and provenance are known before dereferencing or copying it. That condition determines whether the same object can continue, a new object is required, or policy must change.

Correct handling and recovery

Reject the SID, regenerate it from a trusted account lookup or token, and validate serialized lengths at every boundary.

Reconcile partial output and server-side effects before attempting the operation again.

Practical scenario

A custom policy file truncates the final subauthority of a SID. Import validation rejects the entry and obtains a fresh SID from the account name.

Difference from nearby HRESULTs

It is structural invalidity; CO_E_NOMATCHINGNAMEFOUND can involve a structurally valid SID with no resolvable account name.

References


Looking for a different code? Search another status or error code.