0X00000565

Windows Error 0x00000565: Too Many Secrets Stored

Windows Errors Intermediate 👁 0 views 📅 May 27, 2026

Your system hit the secret storage limit. Here's how to clear old secrets and stop it from happening again.

You're stuck with error 0x00000565 and it's annoying

This error pops up when your Windows machine stores more secrets than it can handle. Secrets are things like cached passwords, VPN credentials, and service account tokens. The limit is 256 secrets per system. Once you hit that, new secrets can't be saved. You'll see it after installing new software, changing a service password, or—most commonly—after years of connecting to various networks and apps that leave old secrets behind.

The real fix: clear old secrets from the registry

Don't bother reinstalling Windows or running random cleaners. The fix is straightforward. You'll remove stale secrets from the LSA (Local Security Authority) secret store. Here's how:

Step 1: Open Regedit

  1. Press Windows Key + R, type regedit, hit Enter. UAC will ask—click Yes.
  2. Go to HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets. If you don't see that path, you need to give yourself full permissions first. Right-click on SECURITY key, choose Permissions, and give Administrators full control. Then refresh (F5).
  3. Once you're in Secrets, you'll see a list of subkeys. Each one is a stored secret. Some are system secrets (like NL$KM), which are safe. Others are leftovers from old services, VPNs, or mapped drives.

Step 2: Identify old secrets to remove

Look for secrets with names that reference old software or services you no longer use. Common ones:

  • _SC_{service name} – leftover from removed services.
  • VPN_* or RasDialParams – old VPN connections.
  • L$ prefix – local machine secrets, usually safe but can be cleaned if you're sure.
  • Any GUID-looking subkey from old apps.

Select one, right-click, choose Delete. Confirm. Don't delete anything that looks system-critical like NL$KM, SC_MACHINE_SECRET, or GKList. Those are needed.

Step 3: Count how many you have

Right-click the Secrets key, select Export, save a backup first. Then count the subkeys. If you have more than 256, you've found the problem. Delete until you're under 200 to be safe. After you delete, close Regedit.

Step 4: Reboot

Restart your machine. This flushes the LSA cache and applies the changes. After reboot, try whatever was triggering the error before. It should work now. If you still see the error, repeat steps 1-3 and delete more secrets.

Why this works

Windows has a hard limit of 256 secrets in the LSA store. This isn't documented well, but it's baked into the security subsystem. When you add a secret (like a new VPN password or a service account credential), the system checks the count. If it's at the limit, you get error 0x00000565. Deleting old secrets frees up slots. The registry is where these secrets live under the Secrets key. Clearing them out is the only reliable fix. Tools like CCleaner or Windows Disk Cleanup won't touch LSA secrets because they're protected.

Less common variations of the same issue

Sometimes the same error shows up in different places:

  • Event ID 605 in Security log – The system tried to add a secret and failed. You'll see this in Event Viewer under Windows Logs > Security. The fix is the same: clean the registry.
  • Service fails to start with error 0x00000565 – A service like SQL Server or a remote access tool can't save its credential. Remove old secrets and try again.
  • Mapped drive lost connection – If you use persistent drives with different credentials, the system caches them. Too many mapped drives can hit the limit. Delete unused drive credentials from Credential Manager, then clean the registry as above.

Prevention: stop it from happening again

  • Monitor secret count – Run this PowerShell command once a month:
    Get-ChildItem 'HKLM:\SECURITY\Policy\Secrets' | Measure-Object
    If the count is over 200, you're close to the limit.
  • Clear unused credentials – Open Credential Manager (Control Panel > User Accounts > Credential Manager). Remove old Windows credentials and generic credentials you don't need.
  • Don't let old services pile up – When you uninstall software that uses service accounts, run a cleanup. Check the Secrects key a week later for leftover entries.
  • Limit mapped drives with different credentials – Each one adds a secret. Use the same account if possible, or remove drives you don't use daily.

That's it. Error 0x00000565 is a storage limit, not a sign of corruption. Clear the old secrets, reboot, and you're back in business. If you're still stuck after this, check Event Viewer for a specific service or app name that's failing—then delete secrets tied to that app.

Was this solution helpful?