## Error message
```text
Something went wrong. Error code: 0x80070002. You can try again, or contact your system administrator.
```

## TL;DR
0x80070002 means a file or object the enrollment needed was not found, most often a broken app package or missing policy payload. Check the Intune management extension log for the failing step, fix or remove the offending app or policy, reset the device, and re-run Autopilot.

## Steps
1. On the failed device, collect the Intune management extension log and search for 80070002.
   Expected: The log names the app or policy step that returned the error.
2. In Intune, check the failing app package or policy assignment for a missing source file or bad detection rule.
   Expected: You find the broken package or assignment.
3. Fix the package, exclude the device from the bad assignment, or remove the step per your change process.
   Expected: The assignment no longer targets the broken content.
4. Reset the device and re-run Autopilot enrollment.
   Expected: Enrollment completes past the enrollment status page.

## When to use
- The exact code 0x80070002 appears during Autopilot enrollment
- The failure repeats on reset with the same profile
- The log points at one app or policy step

## When not to use
- The enrollment hangs without an error code (timeout instead)
- The error code is different, like 0x801c0003 (different root cause)
- The device never reaches the enrollment status page (network or Autopilot registration issue)

## Why this happens
0x80070002 is the Windows file-not-found error surfacing through the enrollment engine. During Autopilot it typically means an app installer referenced a missing file, a detection script looked for a path that does not exist, or a policy payload failed to download.

## Edge cases
- A single broken win32 app assigned to all Autopilot devices will brick every enrollment until excluded.
- Reset keeps the Autopilot registration; a full wipe and re-import is rarely needed.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_3G8vemEAufjOFBy8KsjHyQ
