What's going on with 0xC0000419?
You're mid-migration, moving user or computer objects between Active Directory forests, and bam — STATUS_DS_SRC_SID_EXISTS_IN_FOREST. The source object's SID already exists in the destination forest. Translated: Active Directory won't let you bring an object over because its original SID (or a ghost of it) is already hanging around in the target domain.
This usually rears its head when you're using ADMT (Active Directory Migration Tool) or a third-party migration tool, and someone's tried this before, or the target forest still has a placeholder object from a failed migration attempt. I had a client last month whose entire user migration stalled because someone had run a test migration six months earlier and never cleaned up the SIDHistory entry.
Here's the thing — the error is actually doing you a favor. It's stopping you from creating duplicate SIDs, which would corrupt your security token and break resource access. But you still need to fix it. Let's walk through it from quickest to most thorough.
Fix #1: Check for a stale object in the destination (30 seconds)
First, stop panicking and check if the object already exists in the target OU. Open ADUC (Active Directory Users and Computers) on a domain controller in the destination forest. Find the OU you're migrating to and search for the object name.
If it's there, that's your problem. A previous run created a placeholder (often disabled) with the same SID. The fix is simple: delete that placeholder object. Right-click, delete, confirm. Then re-run your migration for that object.
If you're comfortable with PowerShell, this is faster:
Get-ADUser -Filter "SamAccountName -eq 'jsmith'" -Server destinationDC.corp.com | Remove-ADObject -Confirm:$falseFor computer objects, swap Get-ADUser for Get-ADComputer. If the object isn't there, move to the next fix.
Fix #2: Clear SIDHistory on the source object (5 minutes)
If there's no placeholder in the destination, the problem's likely on the source side. The source object's SIDHistory attribute contains a SID from another forest (or a previous migration attempt) that collides with something in the destination. This happens when someone manually set SIDHistory or used a tool that didn't write it correctly.
Fire up an elevated PowerShell on the source domain controller. First, check if SIDHistory has anything in it:
Get-ADUser 'jsmith' -Properties SIDHistory | Select-Object -ExpandProperty SIDHistoryIf you see SIDs listed, and you're sure they're not needed (i.e., you're not migrating from a forest where you need to preserve resource access), clear them. The only supported way to remove SIDHistory without breaking things is using ADMT or netdom. But for a single object, you can use the Remove-ADObject trick with ADSI, though it's a bit hacky. Honestly, the cleanest method is:
netdom remove <sourceComputer> /ud:<domain>\administrator /pd:*Wait, that's for computer accounts. For users, you need a utility like sidhistory.exe from the ADMT toolkit. But if you're in a pinch, here's the PowerShell way that works — it directly edits the attribute (this is safe if you know what you're doing):
Set-ADUser 'jsmith' -Clear SIDHistoryYes, it's that simple. But only do this if you don't need the SIDHistory for access to resources in the source forest. If you do, you're better off fixing the migration tool settings instead of manually clearing. For most small-to-mid-size businesses, clearing SIDHistory won't cause issues because you're moving everything anyway.
After clearing, re-run the migration. If the error persists, it's time to dig deeper.
Fix #3: Use ADMT properly (the real fix, 15+ minutes)
If you're still stuck, the issue is probably in how ADMT is configured. ADMT has a specific option called "Trademark SID History" or "Add SID History" (depending on version). When migrating between forests, ADMT is supposed to carry the source SID into SIDHistory so the user keeps access to source resources. But if the destination forest already has that SID (maybe from a previous migration), it throws 0xC0000419.
The proper approach is to use ADMT's Active Directory Migration Tool 3.2 with the SID History option set correctly. Check your ADMT task settings:
- Open ADMT and create a new User Migration task.
- On the "User Options" page, find "SID History".
- Make sure "Add SID History" is checked only if you actually need it.
- If you're not migrating resource access, leave it unchecked — that prevents the collision entirely.
If you do need SID History, and you're still getting the error, you have to clean up the destination forest. The issue is that the destination forest has a SID that's already in use. That SID is likely from a previous migration that wasn't rolled back correctly. You'll need to find and remove it.
Here's the detective work. On the destination domain controller, search for objects with that specific SID in SIDHistory:
Get-ADObject -LDAPFilter "(sidHistory=*)" -Properties sidHistory | Where-Object {$_.sidHistory -contains 'S-1-5-21-123456789-1234567890-1234567890-1105'} | Select-Object Name, DistinguishedNameReplace the SID with the one from your error. If you find an object, that's your culprit. You can safely remove that object (or clear its SIDHistory if it's a legitimate object that shouldn't have that SID).
If you find nothing, then the SID might be a well-known SID or from a different source. In that case, check your source forest for any orphaned objects that might have been created during a failed migration. Sometimes a source object gets a new SID but the old SID lingers in SIDHistory of another object.
I've also seen this happen when someone accidentally ran a migration in the wrong direction — source and destination reversed. Double-check your ADMT task is from the correct source to the correct destination.
Preventing this next time
The #1 way to avoid 0xC0000419 is to never pre-create objects in the destination OU with the same name or SID. If you're testing migrations, use a separate test OU and clean it out completely before the real run. Also, if you're using a third-party tool like Quest or Semperis, make sure it's up to date — older tools have bugs that cause this exact error.
Another thing: if you're not using ADMT and you're just exporting/importing users with a script, stop. That's how you end up with SIDHistory conflicts. Use a proper migration tool that handles SID translation.
If you've gone through all these steps and still get the error, you might have a corrupt domain. Run dcdiag and repadmin /replsum on both forests to check for replication issues. In rare cases, lingering SIDs can persist due to tombstone issues.
But honestly, 9 times out of 10, it's a stale object. Start there. You'll be done before lunch.