0X800B0103

CERT_E_ROLE Fix: End-Entity Cert Used as CA or Vice Versa

This error means a certificate is doing a job it wasn't built for. I'll show you how to spot it and fix it fast.

Quick Answer

Replace the certificate being used for the wrong purpose—if it's an end-entity cert, swap in a proper CA cert (or vice versa). You can't tweak your way out of this one.

Why This Happens

I know this error is infuriating, especially when you're mid-deployment and everything was fine yesterday. You'll see 0X800B0103 pop up during SSL handshakes, in event logs, or when you're installing a cert on IIS, Exchange, or even in a Java keystore. The OS is basically saying: "This certificate was made to be a leaf (end entity), but something is asking it to act like a root or intermediate CA—or the other way around."

Certificates have a Basic Constraints field that flags whether they can sign other certificates. When that flag doesn't match what the system expects, Windows throws CERT_E_ROLE. The most common real-world trigger? Someone grabs a code-signing or SSL server cert (which is end-entity) and tries to use it as a root for a Wi-Fi network or as a corporate CA. Or you exported a CA cert and imported it into the wrong store—like the Personal store instead of Trusted Root.

Fix Steps

  1. Identify the offending certificate. Run this in an admin PowerShell to list certs and their roles:
    Get-ChildItem -Path Cert:\LocalMachine\My | Format-List Subject, Thumbprint, NotAfter, HasPrivateKey
    Look for the cert that matches the error in your application logs. Pay attention to thumbprints—you'll need them for the next steps.
  2. Check the Basic Constraints. Double-click the cert in the MMC (certmgr.msc), go to Details, and scroll to Basic Constraints. If it says Subject Type=End Entity and you're using it as a CA, that's your problem. If it says Certificate Authority and you're using it for SSL on IIS, same deal.
  3. Remove the mismatched cert from the store. In the same PowerShell window, delete the bad cert:
    Get-ChildItem -Path Cert:\LocalMachine\My | Where-Object {$_.Thumbprint -eq "YOUR_THUMBPRINT"} | Remove-Item
    Don't panic if you need it later—export a backup first. But honestly, if it's causing this error, you shouldn't be using it in that role anyway.
  4. Install the correct cert. If you need a CA cert (like for Active Directory Certificate Services), place it in Cert:\LocalMachine\Root for trust. For an end-entity cert (SSL, code signing), keep it in Cert:\LocalMachine\My (or the appropriate store for your service, like WebHosting on IIS). Use the Certificate Import Wizard or PowerShell:
Import-Certificate -FilePath "C:\path\to\correct.cer" -CertStoreLocation Cert:\LocalMachine\My
  1. Restart the service or application. IIS: iisreset. Exchange: restart the MSExchangeFrontEndTransport. Whatever's throwing the error, give it a fresh start so it picks up the new cert.

If It Still Fails

Sometimes the cert isn't the problem—it's the chain. Check if an intermediate CA is missing or if a root was revoked. Use this to validate:

certutil -verify -urlfetch YOUR_CERT_FILE.cer

If that returns a chain error, you'll need to install the correct intermediate. Also, check if your application is forcing a specific role—some Java apps expect the server cert to have basicConstraints=CA:true (which is wrong, but it happens). If you can't change the app, you'll need a cert that matches its expectations, not a standard one.

One more thing: if you're getting this on a smart card or device cert, the device might be misconfigured. In that case, re-enroll the cert with the proper template. Don't try to hand-edit the cert—that's not how X.509 works.

Prevention

Double-check the cert's intended use before you deploy. Read the Enhanced Key Usage field: if it says Server Authentication, don't try to use it as a CA. Buy or issue separate certs for different roles. And keep a naming convention: put CA purpose in the subject or friendly name so future-you doesn't guess wrong.

Also, enable audit logging on your CA (if you run one) so you can see what certs are being issued and flag any with odd extensions. A 5-minute check now saves you an hour of digging later.

Related Errors in Cybersecurity & Malware
0XC0020032 Fix 0XC0020032: Invalid Security Context on RPC Call Error code: 0x800B010A or 0x80092013 Fix Certificate Revocation Check Unavailable Error in Windows 10/11 0X000035EA Fix ERROR_IPSEC_IKE_ATTRIB_FAIL (0X000035EA) in Windows Account Shows Sessions From Multiple Locations – What's Happening?

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.