0XC00002A4

Fix Active Directory error 0XC00002A4: attribute already exists

Server & Cloud Intermediate 👁 7 views 📅 May 28, 2026

This error means AD already has the attribute or value you're trying to add. Here's how to clear it fast, from a quick reboot to a deep ADSI edit.

Quick fix (30 seconds) — reboot the domain controller

I know, rebooting sounds like a joke. But nine times out of ten, this error is a temporary glitch in the NTDS database. Something got written mid-transaction, the controller got confused, and a simple restart flushes that out.

On your domain controller, click Start, then the power icon, select Restart. Wait for it to come back fully (check event log for 2142 — that's AD ready). Then try your operation again. If the error's gone, you're done. If not, move on.

Moderate fix (5 minutes) — check for replication conflicts

This error pops up when two domain controllers try to write the same attribute value at almost the same time. You know — someone created a user on DC1, then your script tried to add the same user on DC2 before replication finished.

Open Active Directory Users and Computers (dsa.msc). Right-click the domain, choose Operations Masters. Click the Infrastructure tab. If the server listed is different from your current DC, replication might be stalled.

Now run a manual replication:

  1. Open Active Directory Sites and Services (dssite.msc).
  2. Expand Sites, expand your site, then Servers, then your DC.
  3. Right-click NTDS Settings, choose Replicate Now.
  4. Do this on every DC that talks to this one.

After replication finishes, try your original action again. If it still fails, the duplicate value is sitting in the database and you need to remove it manually.

Advanced fix (15+ minutes) — remove the duplicate attribute with ADSI Edit

This is where we get into the guts. The error code 0XC00002A4 maps to STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS. It means the attribute you're trying to set (like a telephone number, an email, or even the object's GUID) already holds that exact string.

You need ADSI Edit to find and remove the duplicate. I've done this hundreds of times. Don't stress — just follow each step exactly.

Step 1: Install ADSI Edit if you don't have it

On a Windows Server 2019/2022 DC, ADSI Edit is part of the RSAT tools. Open Server Manager, click Add Roles and Features, go to Features, check Remote Server Administration Tools > Role Administration Tools > AD DS and AD LDS Tools, and install.

Or just type adsiedit.msc from an admin command prompt. If it opens, you're good.

Step 2: Connect to the correct naming context

In ADSI Edit, right-click ADSI Edit at the top, choose Connect to. For Naming Context, pick Default naming context (your domain). Click OK.

You'll see a tree expand with your domain name. This is the live AD database — be careful.

Step 3: Find the object that's causing the error

Expand your domain, expand CN=Users or CN=Computers (wherever the object lives). Right-click the object that gave you the error — say, a user account — and choose Properties.

In the Attribute Editor tab, look through the list. The error might mention a specific attribute like mail or telephoneNumber. Find that attribute. If its value is already set to the exact string you tried to add, that's your duplicate.

For example, if you tried to add mail: bob@company.com and the attribute mail already shows bob@company.com, you have a duplicate.

Step 4: Remove the duplicate value

Double-click the attribute. In the dialog, you'll see one or more values. Highlight the duplicate value and click Remove. Click OK. Then click OK on the property window.

That's it. Now go back to your original tool (ADUC or PowerShell) and try to add the value again. It should succeed.

Step 5: Force replication (just in case)

After you make the change, run repadmin /syncall /AdeP from an elevated command prompt on that DC. This forces a full sync. Wait a minute, then retry your operation.

If the error still persists — use ntdsutil

This is your last resort. If ADSI Edit didn't work, the duplicate might be stuck in the database itself. Open an elevated command prompt and run:

ntdsutil
activate instance ntds
files
integrity

Let it run. This checks the DIT (directory information tree) for corruption. If it finds errors, run:

ntdsutil
files
repair

That rebuilds the database. It takes a few minutes. After it finishes, reboot the DC and try again.

What causes this error in real life?

I've seen this most often during automated provisioning scripts. Someone writes a PowerShell script that tries to add an email address to a user, but the script runs every hour and doesn't check if the attribute already has that value. Boom — error 0XC00002A4 on the second run.

Another common trigger: migrating users from one domain to another. The target domain already has the same userPrincipalName or sAMAccountName, and the migration tool tries to write it again.

One last opinionated piece of advice

Don't just clear the attribute blindly. Write down what it was. You might break an application that expects that value. If you're not sure, snapshot the DC first (if it's virtualized) or export the object with Get-ADUser -Identity bob -Properties * before you touch anything.

That's it. You should be up and running in under 20 minutes, most likely in under 5.

Was this solution helpful?