0X00000517

Fix ERROR_LOCAL_USER_SESSION_KEY (0X00000517) on Windows 10/11

No encryption key available when accessing encrypted files or EFS. Usually a corrupted user profile or EFS certificate. Here's how to fix it.

Cause 1: Corrupted user profile or EFS certificate mismatch

The most common reason you see ERROR_LOCAL_USER_SESSION_KEY (0X00000517) is a broken link between your Windows user account and the encryption certificate used for Encrypting File System (EFS). This usually happens after a profile repair, a domain migration, or when you restore from a backup that didn't include the EFS keys. You'll notice it when you try to open a file or folder with a green padlock overlay—the one that indicates encryption.

Fix: Recover or reissue your EFS certificate

  1. Press Win + R, type certmgr.msc, and hit Enter. This opens the certificate manager.
  2. Expand Personal > Certificates. Look for a certificate with "Encrypting File System" in its intended purpose. If you see one, skip to step 5. If not, continue.
  3. If no EFS certificate exists, you need to create a new one. But first, check if you have a backup file (usually a .PFX) from when you first encrypted your data. If you have it, right-click Personal > All Tasks > Import, and follow the wizard to import it.
  4. If you don't have a backup, you're stuck—without the original key, the encrypted files are unrecoverable. But if you're seeing the error on a new profile or after a clean install, you can create a new EFS certificate by right-clicking an encrypted file, going to Properties > Advanced > Details, and clicking Back up keys (though this fails if there's no key). The real fix here is to create a new certificate via cipher /k in an elevated command prompt.
  5. Open Command Prompt as administrator: type cmd in the Start menu, right-click it, and choose Run as administrator.
  6. Run this command and press Enter:
    cipher /k
    After you run it, you should see a message like "A new key marked as the EFS key has been created." Windows will now use this new key for all future encryption. But existing encrypted files won't be readable unless you had a backup of the old key.

The reason this fix works most often is that the error usually appears right after a Windows update or a profile repair that orphaned the old certificate. Generating a fresh key stops the error for new files, and you can then re-encrypt or decrypt the old ones if you have the old key.

Cause 2: Encrypted files moved to a different computer or user account

If you copied encrypted files to a new PC or a different user profile, the EFS key isn't there. EFS encryption is tied to the user's SID (Security Identifier) and the certificate. When you move a file with a USB stick or a network share, the encryption stays, but the key doesn't travel with it. That's when you get 0X00000517.

Fix: Decrypt the files on the original machine, then move them

  1. On the original computer, log in as the user who encrypted the files.
  2. Right-click the folder or file, select Properties.
  3. In the General tab, click Advanced.
  4. Uncheck Encrypt contents to secure data and click OK. Then click Apply.
  5. Windows will ask if you want to apply to this file only or all files in the folder. Choose Apply changes to this folder, subfolders and files. After the decryption completes, you'll see the padlock disappear.
  6. Now copy the files to the new location. They're plain text at this point, so no key is needed.

If you can't access the original machine, you're out of luck. The only way to recover is with the EFS certificate backup (.PFX file) and the password. If you don't have that, data recovery services might help, but they usually can't crack EFS if the key is strong.

Cause 3: User profile corruption where the session key can't be loaded

Sometimes the certificate is fine, but the user profile itself is damaged. This often happens after a forced shutdown, a disk error, or a bad Group Policy update. The error appears because Windows can't load the user's local session key into memory, even though the certificate exists.

Fix: Create a new user profile and migrate your files

  1. Create a new user account: Go to Settings > Accounts > Family & other users (Windows 10) or Other users (Windows 11). Click Add someone else to this PC and create a local account.
  2. Log out of your current account and log into the new one.
  3. Copy your files from the old profile: Navigate to C:\Users\OldUsername\ and copy the contents of Documents, Desktop, and other folders you need to the new profile's corresponding folders. Do not copy the entire profile folder—that includes the corrupt parts.
  4. If the encrypted files are in the old profile, you might not be able to open them even after copying because the EFS key is tied to the old user account. Before you copy, try to decrypt them from the old profile (if you can log in temporarily). If you can't, you'll need to export the EFS certificate from the old profile using certmgr.msc, then import it into the new profile.

The new profile gives you a clean set of registry keys and session key storage. If the issue was a corrupted profile, this fixes it. But again—encrypted files need the original EFS key. Copying them without decrypting them first will just reproduce the error on the new profile.

Quick reference summary

Cause Fix When to try
Missing or mismatched EFS certificate Run cipher /k or import a .PFX backup Error appears after a profile repair or Windows update
Files moved to a new PC/USB Decrypt files on original machine before moving You recently transferred encrypted files
Corrupted user profile Create a new profile and migrate files Other errors show up, or you can't log in properly

The hard truth about this error: if you don't have the original EFS key, those encrypted files are gone. Windows doesn't provide a backdoor. So always back up your EFS certificate (via certmgr.msc > right-click certificate > All Tasks > Export) and store it somewhere safe. That's the one thing that saves you from this mess.

Related Errors in Cybersecurity & Malware
0XC00D2844 NS_E_DRM_INDIV_NO_CABS: Fix the 0XC00D2844 Security Upgrade Error 0X80090346 SEC_E_BAD_BINDINGS (0x80090346): Channel Binding Mismatch Fix 0X800B0112 CERT_E_UNTRUSTEDCA (0x800B0112) Fix That Actually Works 0X80280000 TPM Error 0x80280000: Quick Fix and What Causes It

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.