How to fix Error 1365 on Windows 11

Why This Error Happens

Error 1365 occurs when the security token associated with a user’s logon session becomes invalid or desynchronized from the Local Security Authority (LSA) before a dependent operation—such as a service logon, network authentication, or credential update—completes. This is commonly triggered by corrupted user profile caches, expired Kerberos tickets, or a mismatch between cached credentials and Active Directory/local SAM data. It can also surface when a background process attempts to modify session privileges while the user is mid-authentication, such as during a password change or a Group Policy refresh.

Step-by-Step Resolution Guide

Step 1: Clear Cached Credentials and Restart the Logon Session

  • Open Credential Manager via Control Panel > User Accounts > Credential Manager.
  • Remove any stale Windows Credentials tied to the affected account.
  • Log off completely and back on rather than using “Switch User” to force a fresh token generation.

Step 2: Flush Kerberos Tickets and Reset Local Security Authority Cache

  • Open Command Prompt as Administrator.
  • Run: klist purge to clear all cached Kerberos tickets.
  • Run: gpupdate /force to resync Group Policy and refresh security tokens.
  • Restart the Netlogon service via services.msc if the machine is domain-joined.

Step 3: Repair the User Profile and System Files

  • Run sfc /scannow to check for and repair corrupted system files that may affect the LSA.
  • Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList in Registry Editor and verify there is no duplicate or .bak profile entry causing a session state conflict.
  • If a duplicate SID key exists, rename the corrupted key’s ProfileImagePath reference only after backing up the registry.

Step 4: Reset the Windows Security Component via PowerShell

  • Open PowerShell as Administrator.
  • Run: Restart-Service -Name SamSs -Force to restart the Security Accounts Manager service.
  • Reboot the system fully (not a fast restart) to ensure the LSA reinitializes cleanly with the SAM service.

Alternative or Verification Steps

  • To verify the fix, attempt the original action (password change, network drive mapping, or RDP session) again and confirm no Error 1365 dialog appears in Event Viewer under Windows Logs > System.
  • If the issue persists, create a new local user profile via Settings > Accounts > Other Users and migrate data manually, as this bypasses a permanently corrupted logon session token tied to the old profile.