## TL;DR
Decide which row owns the employee ID, remove or correct the other, and re-import. Compare the duplicate rows field by field to tell a true double entry from two people sharing an ID by data error, fix the HR system of record first so the next export is clean, dedupe the file if a manual import is unavoidable, and add a pre-import duplicate check.

```text
HR CSV import provisioning failed: duplicate employee ID error
```

## Use this when
- The CSV import rejects the batch or specific rows naming a duplicated employee identifier.
- The file comes from an HR export that recently changed or a manual spreadsheet process.
- Downstream accounts for the affected people are missing or half-created.

## Not for this skill when
- The import succeeded but created duplicate accounts downstream. That is a matching problem in the target, not the file.
- The error names a different unique field such as email. Apply the same method to that field instead.

## Steps
1. Open the import error report and the CSV file as exported for the affected hire and capture the full error detail, the operation that failed, and the identifiers involved, rather than working from the summary banner alone. Keep one hire as the test case for every change so cause and effect stay clear. Verify: the full error detail and one test hire are recorded
2. Open the import report and the CSV, find every row carrying the duplicated ID, and compare names, emails, start dates, and worker types to classify the case as the same person twice, two people with one mistyped ID, or a rehire reusing an ID incorrectly. Verify: the duplicate case type is classified with both rows documented
3. Fix the system of record: merge the double entry in HR, correct the mistyped ID on the wrong person record, or link the rehire to the original ID per policy, so the next export carries one row per person with unique IDs. Verify: the HR records show unique IDs for the affected people
4. Apply the correction in the HR import process and save it, then re-run provisioning for the single test hire only and read the fresh log entry end to end. If it still fails, treat the new detail as the current cause and do not stack further changes on top. Verify: the test hire provisions successfully or a new specific detail replaces the old one
5. If the import cannot wait for a fresh export, produce a corrected file from the fixed HR data rather than hand-editing rows in the CSV, and keep a note of the correction with the import batch for audit. Verify: the hire downstream import check passes with the corrected file
6. Re-run the import and confirm both affected people provision with their correct accounts and no orphan half-created records remain from the failed attempt, cleaning up partial records the first run left. Verify: the hire downstream checks pass in their own systems

## Why it happens
Employee IDs are the join key every downstream system trusts, so imports enforce their uniqueness strictly. Duplicates arise from ordinary HR events handled inconsistently: a person entered twice under time pressure, a rehire given a fresh record, or a typo that copies a neighbouring ID. The import rejection is protective; pushing past it would split one person across two identities or merge two people into one. Resolving identity in the system of record and validating before import keeps the key trustworthy for every system that depends on it.

## Variants and edge cases
### Rehire legitimately reuses the original ID
Rehires should reuse the ID on the original record. If the file holds old and new rows, the old terminated row must be the same record updated, not a second row.

### Spreadsheet merged or sorted badly
Manual CSV handling can misalign rows. Regenerate the export from HR rather than repairing a hand-damaged file.

### ID duplicates only in a contractor file
Contractor IDs from an agency system can collide with employee IDs. Namespace contractor IDs at intake with an agreed prefix in the mapping.

Compatibility: Applies to CSV-based HR provisioning imports into identity platforms and directories. Requires HR system admin cooperation.

## Provenance

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