What does HRESULT 0x87C51039 (UTC_E_UNAPPROVED_SCRIPT) mean?

 
Previous Next
UTC_E_THROTTLED UTC_E_SCRIPT_MISSING

UTC_E_UNAPPROVED_SCRIPT

Where the UTC workflow stopped: DiagTrack script approval policy

UTC_E_UNAPPROVED_SCRIPT (0x87C51039) is a Universal Telemetry Client result from the policy and trust enforcement layer for this HRESULT. The decisive question is which UTC object rejected the request for this HRESULT. Here the relevant owner is DiagTrack script approval policy: the referenced script exists and has a recognized type but is not approved for scenario execution for this HRESULT. This is narrower than a generic failure of Connected User Experiences and Telemetry for this HRESULT.

DiagTrack applies allowlists, signer checks, path restrictions and destination-specific collection policy for this HRESULT. These gates are intended security/privacy boundaries. Diagnosis should identify the exact denied capability rather than recommending broad privilege or policy changes for this HRESULT. Record the configuration package or scenario generation together with the Windows build; otherwise a repaired file can be tested against a stale in-memory graph and appear to fail for the same reason for this HRESULT.

Evidence to preserve

UTC diagnostic fieldValue
Producing layerpolicy and trust enforcement
Owning state or objectDiagTrack script approval policy
Decisive evidencescript path, hash, signer, catalog/package, scenario signature, approval rule and target build
Narrow comparisonrun a known approved script through the same RunScriptAction and compare policy events
Do not confuse withUTC_E_SCRIPT_MISSING means no file is present at the approved reference

The AllStat message names the immediate condition as “The script is not approved to run as part of DiagTrack scenario” for this HRESULT. In practice, the useful extension is to ask whether the request was rejected before any side effect, after partial setup, or during cleanup for this HRESULT. Verify the existence and ownership of the expected output—session, directory, process, result object or emitted event—rather than assuming the message describes the final system state for this HRESULT.

Controlled reproduction

  1. Associate this result with one request, one scenario version and one service process ID for this HRESULT.
  2. Save script path, hash, signer, catalog/package, scenario signature, approval rule and target build and the first lower-level HRESULT if one exists for this HRESULT.
  3. Change no policy, provider set or destination except for this test: run a known approved script through the same RunScriptAction and compare policy events for this HRESULT.
  4. Compare the produced artifacts and operational events, not only the top-level return Value.

The most informative neighbor is UTC_E_SCRIPT_MISSING. The distinction is concrete: UTC_E_SCRIPT_MISSING means no file is present at the approved reference for this HRESULT. Keeping both symbolic names in logs prevents a broad “DiagTrack error” bucket from hiding whether the failure occurred during parsing, authorization, resource acquisition, execution or teardown for this HRESULT.

Policy-preserving test

Build the passing case for this HRESULT with an approved path, signer, command or certificate while keeping the enforcement mechanism enabled for this HRESULT. This demonstrates compliance with the policy boundary rather than merely removing the boundary for this HRESULT.

Correction and verification

Deploy the approved signed artifact or replace the action; do not weaken script policy globally for this HRESULT. Apply that change only to the owning boundary for this HRESULT. A successful repair must make the controlled case cross this boundary while retaining the intended policy, trace providers, destination and security context for this HRESULT.

Restarting Windows, clearing every ETL file or disabling diagnostic policy is not a justified first response to this result. Those actions destroy evidence and can change several independent UTC gates at once for this HRESULT.

  • the same request now produces its documented success or nonfatal status without a second hidden retry
  • the operational log shows one coherent request lifetime and no orphaned action, timer, process or trace session
  • teardown followed by a second run does not reuse stale state or recreate DiagTrack script approval policy
  • the nearby condition remains distinguishable: UTC_E_SCRIPT_MISSING means no file is present at the approved reference

Technical references


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