Entra IDDeep dive

Kerberos error codes: KDC_ERR and KRB_AP_ERR results in events 4768, 4769 and 4771

Kerberos result and failure codes from events 4768, 4769 and 4771, plus the KDC's RC4 and certificate-mapping events, with what each means, the usual cause and the first check.

A failed Kerberos request in Active Directory leaves a hex code behind: a Result Code in event 4768, a Failure Code in 4769 or 4771, or a KDC_ERR or KRB_AP_ERR name in a System log event. This quick reference decodes the codes Microsoft documents for those events, adds the KDC events behind the recent RC4 and certificate-mapping hardening, and gives the usual cause and the first check for each.

Codes in this quick reference

  • 0x6 KDC_ERR_C_PRINCIPAL_UNKNOWN: client not found in Kerberos database (user name doesn't exist)Security log (4768 / 4771), domain controller
  • 0x12 KDC_ERR_CLIENT_REVOKED: account disabled, expired or locked outSecurity log (4768 / 4771), domain controller
  • 0x17 KDC_ERR_KEY_EXPIRED: password has expiredSecurity log (4771), domain controller
  • 0x18 KDC_ERR_PREAUTH_FAILED: pre-authentication information was invalid (wrong password)Security log (4771), domain controller
  • 0x19 KDC_ERR_PREAUTH_REQUIRED: additional pre-authentication required (usually expected)Security log / Kerberos event logging
  • 0xC KDC_ERR_POLICY: KDC policy rejects request (logon restrictions)Security log (4768 / 4769), domain controller
  • 0x9 KDC_ERR_NULL_KEY: the client or server has a null keySecurity log (4768 / 4769), domain controller
  • 0x10 KDC_ERR_PADATA_TYPE_NOSUPP: smart card logon, DC certificate or CA problemSecurity log (4771), domain controller

+ 37 more codes in the tables below.

How this guide is organized: How to read these codes → Account, password and pre-authentication → Services and SPNs → Encryption types and RC4 → Time, replay and transport → Smart cards and certificate mapping → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Account, password and pre-authentication. 3. Services and SPNs. 4. Encryption types and RC4. 5. Time, replay and transport. 6. Smart cards and certificate mapping. 7. How to verify a fix. Toolbox: Event ID 4768, setspn -Q, setspn -D, Set-ADComputer, …\Kerberos\Parameters.1How to read thesecodes2Account, passwordand pre-authenticat…3Services and SPNs4Encryption types andRC45Time, replay andtransport6Smart cards andcertificate mapping7How to verify a fixTOOLBOXEvent ID 4768setspn -Qsetspn -DSet-ADComputer…\Kerberos\ParametersHow this guide is organized: How to read these codes → Account, password and pre-authentication → Services and SPNs → Encryption types and RC4 → Time, replay and transport → Smart cards and certificate mapping → How to verify a fixFlow diagram of the article's sections in reading order: 1. How to read these codes. 2. Account, password and pre-authentication. 3. Services and SPNs. 4. Encryption types and RC4. 5. Time, replay and transport. 6. Smart cards and certificate mapping. 7. How to verify a fix. Toolbox: Event ID 4768, setspn -Q, setspn -D, Set-ADComputer, …\Kerberos\Parameters.1How to read these codes2Account, password and pre-authentication3Services and SPNs4Encryption types and RC45Time, replay and transport6Smart cards and certificate mapping7How to verify a fixTOOLBOXEvent ID 4768setspn -Qsetspn -DSet-ADComputer…\Kerberos\Parameters
At a glance: how this guide is organized · 7 sections · 5 key settings and tools

Status (October 2026): Microsoft's RC4 hardening for CVE-2026-20833 (KB5073381) has reached its final phase: updates from January 13, 2026 added KDCSVC audit events 201 to 209, updates from April 14, 2026 made AES-SHA1 only (0x18) the KDC default for accounts without msDS-SupportedEncryptionTypes, and updates released in or after July 2026 remove the RC4DefaultDisablementPhase rollback value. Separately, since the September 9, 2025 updates, domain controllers can no longer be moved back to Compatibility mode for certificate mapping (KB5014754). Both articles are updated over time, so re-check them.

How to read these codes#

Which Kerberos event holds the code and how to read itWhere did you find the failure? if DC Security log: Which event ID is it? if 4768: TGT request: read the Result Code (Anything but 0x0 is a failure; 0x10 and 0x18 produce 4771 instead); if 4769: Service ticket: read the Failure Code (Many 0x20 failures are routine expired tickets); if 4771: Pre-authentication failed (Read the Failure Code; not logged for accounts that don't require preauthentication); if System log: Security-Kerberos or Kdcsvc event (Clients and servers: events 3 and 4; DCs: Kdcsvc 39 and 201 to 209)Where did you find the failure?Which event ID is it?NOTETGT request: read theResult CodeAnything but 0x0 is afailure; 0x10 and 0x18produce 4771 instead4768NOTEService ticket: read theFailure CodeMany 0x20 failures areroutine expired tickets4769NOTEPre-authenticationfailedRead the Failure Code; notlogged for accounts thatdon't requirepreauthentication4771DC Security logNOTESecurity-Kerberos orKdcsvc eventClients and servers: events3 and 4; DCs: Kdcsvc 39and 201 to 209System logWhich Kerberos event holds the code and how to read itWhere did you find the failure? if DC Security log: Which event ID is it? if 4768: TGT request: read the Result Code (Anything but 0x0 is a failure; 0x10 and 0x18 produce 4771 instead); if 4769: Service ticket: read the Failure Code (Many 0x20 failures are routine expired tickets); if 4771: Pre-authentication failed (Read the Failure Code; not logged for accounts that don't require preauthentication); if System log: Security-Kerberos or Kdcsvc event (Clients and servers: events 3 and 4; DCs: Kdcsvc 39 and 201 to 209)Where did you find the failure?DC Security logWhich event ID is it?4768NOTETGT request: read the Result CodeAnything but 0x0 is a failure; 0x10 and 0x18produce 4771 instead4769NOTEService ticket: read the Failure CodeMany 0x20 failures are routine expired tickets4771NOTEPre-authentication failedRead the Failure Code; not logged for accountsthat don't require preauthenticationSystem logNOTESecurity-Kerberos or Kdcsvc eventClients and servers: events 3 and 4; DCs: Kdcsvc 39and 201 to 209
Figure 1 · Decision tree Which Kerberos event holds the code and how to read it. Start from the log where you found the failure; each outcome names the field that holds the code and what to keep in mind.
EventLoggedCode field and notes
4768 A Kerberos authentication ticket (TGT) was requestedDomain controllers, Security log; Audit Kerberos Authentication ServiceResult Code; anything but 0x0 is a failure. Codes 0x10 and 0x18 never appear here: they produce 4771 instead
4769 A Kerberos service ticket was requestedDomain controllers, Security log; Audit Kerberos Service Ticket OperationsFailure Code. Many 0x20 failures are routine expired tickets. Some failures are only logged when the KDC's KdcExtraLogLevel value includes 0x01 (unknown SPN) or 0x10 (encryption type and bad options)
4771 Kerberos pre-authentication failedDomain controllers, Security log; Audit Kerberos Authentication ServiceFailure Code; not logged for accounts set to "Do not require Kerberos preauthentication"
Security-Kerberos events 3 and 4System log on the client or serverEvent 3 carries the error code once Kerberos logging is on; event 4 reports KRB_AP_ERR_MODIFIED
Kdcsvc events 39 and 201 to 209System log on domain controllersCertificate mapping (39) and RC4 hardening (201 to 209)

On Windows Server 2016 and later with the January 14, 2025 or later cumulative update, 4768 and 4769 also show the account's, service's and DC's msDS-SupportedEncryptionTypes, their available keys, the client's advertised encryption types and the session key type, which makes encryption failures easy to read. The Client Address field tells you which machine sent the request. To pull recent failures from a DC:

PowerShell
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4768,4769,4771} -MaxEvents 2000 |
    ForEach-Object {
        $d = @{}
        ([xml]$_.ToXml()).Event.EventData.Data | ForEach-Object { $d[$_.Name] = $_.'#text' }
        [pscustomobject]@{ Time = $_.TimeCreated; Event = $_.Id; Account = $d.TargetUserName
                           Service = $d.ServiceName; Client = $d.IpAddress; Code = $d.Status }
    } | Where-Object Code -ne '0x0' | Format-Table -AutoSize

On a client or member server, set LogLevel (REG_DWORD) to 1 under HKLM\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters; errors then appear in the System log. Remove the value afterwards: it also logs expected errors such as KDC_ERR_PREAUTH_REQUIRED (see Enable Kerberos event logging).

Account, password and pre-authentication#

CodeMeaningUsual causeFirst check
0x6 KDC_ERR_C_PRINCIPAL_UNKNOWNClient not found in Kerberos databaseThe user name doesn't exist: typo, deleted account, wrong domain. Bursts can mean account enumerationThe name and Client Address in the event
0x12 KDC_ERR_CLIENT_REVOKEDClient's credentials have been revokedAccount disabled, expired or locked outGet-ADUser alex -Properties Enabled, LockedOut, AccountExpirationDate
0x17 KDC_ERR_KEY_EXPIREDPassword has expiredThe user's password expired (logged in 4771)Change it; for a service account, update every place it's stored
0x18 KDC_ERR_PREAUTH_FAILEDPre-authentication information was invalidWrong password (4771 only); counts toward lockout, and bursts suggest password guessingClient Address shows the sender; see tracing lockouts
0x19 KDC_ERR_PREAUTH_REQUIREDAdditional pre-authentication requiredNormal: Windows clients send the first request without pre-authentication. Also MIT Kerberos clientsIgnore unless a non-Windows client doesn't retry
0xC KDC_ERR_POLICYKDC policy rejects requestLogon restrictions: allowed workstations, smart card required, logon hoursThe account's Log On To, logon hours and smart card settings
0x9 KDC_ERR_NULL_KEYThe client or server has a null keyNo key found for the accountReset the account's password
0x10 KDC_ERR_PADATA_TYPE_NOSUPPNo support for the pre-authentication data typeSmart card logon (4771): the DC has no Domain Controller or Domain Controller Authentication certificate, or the CA can't be reachedThe DC's certificate and CA availability

Services and SPNs#

CodeMeaningUsual causeFirst check
0x7 KDC_ERR_S_PRINCIPAL_UNKNOWNServer not found in Kerberos databaseNo account holds the requested SPN; the client falls back to NTLM where allowed. Connecting to a share by IP address (cifs/<IP>) causes it routinelysetspn -Q HTTP/app.contoso.com; register the SPN on the account that runs the service
0x8 KDC_ERR_PRINCIPAL_NOT_UNIQUEMultiple principal entries in KDC databaseDuplicate SPN on two accountssetspn -X -F, then setspn -D on the wrong account
0x1B KDC_ERR_MUST_USE_USER2USERServer principal valid for user2user onlyMicrosoft notes the service is missing an SPNRegister the SPN
0xD KDC_ERR_BADOPTIONKDC cannot accommodate requested optionTGT about to expire, or the SPN isn't in the front-end account's allowed-to-delegate-to list. Clients also retry with other optionsThe front-end account's msDS-AllowedToDelegateTo
0x29 KRB_AP_ERR_MODIFIEDMessage stream modifiedTicket encrypted with the wrong key: SPN on the wrong account, password mismatch, or DNS sending the client to the wrong serversetspn -Q for the SPN, then check the name resolves to the server running under that account
0x2C KRB_AP_ERR_BADKEYVER / 0x2D KRB_AP_ERR_NOKEYKey version / service key not availableThe server no longer has the key version the ticket used, or has no key for that realmRecent password changes on the service account; re-export keytabs on non-Windows services
0x24 KRB_AP_ERR_BADMATCHTicket and authenticator don't matchRequest sent to the wrong KDC, or an account mismatch during protocol transitionDelegation (protocol transition) settings
0x23 KRB_AP_ERR_NOT_USThe ticket isn't for usThe server got a ticket meant for another realmRealm and SPN mapping across trusts
0x44 KDC_ERR_WRONG_REALMIncorrect domain or principalA cross-realm TGT presented to the wrong realm, typically from DNS misconfigurationDNS and trust routing between the domains

The client-side twin of 0x29 is System log event 4: The Kerberos client received a KRB_AP_ERR_MODIFIED error from the server. The Exchange alternate service account guide shows the classic load-balancer case.

Encryption types and RC4#

Code or eventMeaningUsual causeFirst check
0xE KDC_ERR_ETYPE_NOTSUPPKDC has no support for encryption typeNo encryption type in common, for example RC4 or DES removed on one side, or an account without AES keysAdvertised types, msDS-SupportedEncryptionTypes and available keys in the updated 4768/4769
0xF KDC_ERR_SUMTYPE_NOSUPPKDC has no support for checksum typeA party lacks a key of the needed encryption typeAs for 0xE
Kdcsvc 201 / 203... client only supports insecure encryption types (201 warns; 203 blocked)The client advertises only RC4 and the service has no msDS-SupportedEncryptionTypesUpdate or replace the client, or explicitly allow RC4 on that service account
Kdcsvc 202 / 204... the service account only has insecure keys (202 warns; 204 blocked)The service account has no AES keysReset its password so AES keys are generated
Kdcsvc 205The Key Distribution Center detected explicit cipher enablement in the Default Domain Supported Encryption Types policy configuration.The DC's DefaultDomainSupportedEncTypes includes more than AES-SHA1; logged at KDC start, never becomes an errorRemove insecure ciphers from that value once nothing depends on them
Kdcsvc 206 / 208Service set to AES-SHA1 only, but the client doesn't advertise AES-SHA1 (208: denied)An RC4-only client against an AES-only service or DC defaultUpdate the client
Kdcsvc 207 / 209Service set to AES-SHA1 only, but the account has no AES-SHA1 keys (209: denied)AES-only configuration on an account whose password predates AES keysReset the account's password

The warning events (201, 202, 206, 207) were logged during audit mode; under enforcement you see their blocking counterparts (203, 204, 208, 209). AES keys are created when a password is set, so an old service account password is the most common reason for "insecure keys":

PowerShell
Get-ADUser svc-app -Properties msDS-SupportedEncryptionTypes, PasswordLastSet
# AES only (reset the password first if it predates AES keys):
Set-ADUser svc-app -Replace @{'msDS-SupportedEncryptionTypes' = 0x18}
# A device that can't do AES and can't be fixed by its vendor: RC4 with AES session keys, this account only
Set-ADUser svc-app -Replace @{'msDS-SupportedEncryptionTypes' = 0x24}

Use Set-ADComputer or Set-ADServiceAccount for computer accounts and gMSAs. Microsoft's Detect and remediate RC4 usage in Kerberos covers the wider clean-up.

Time, replay and transport#

CodeMeaningUsual causeFirst check
0x25 KRB_AP_ERR_SKEWThe clock skew is too greatClocks differ by more than "Maximum tolerance for computer clock synchronization" (5 minutes by default)w32tm /query /source, w32tm /stripchart /computer:DC01 /samples:3 /dataonly
0x21 KRB_AP_ERR_TKT_NYVThe ticket is not yet validKDC and client clocks out of sync; across realms, check both KDCsSame time checks
0xA KDC_ERR_CANNOT_POSTDATE / 0xB KDC_ERR_NEVER_VALIDNot eligible for postdating / start time later than end timeTime difference with the KDC; Microsoft systems don't request postdated ticketsTime sync; investigate a client that repeats it
0x20 KRB_AP_ERR_TKT_EXPIREDThe ticket has expiredRoutine; tickets renew automaticallyNothing, unless one client loops on it
0x22 KRB_AP_ERR_REPEATThe request is a replayThe same authenticator arrived twiceTreat repeats as suspicious
0x1F KRB_AP_ERR_BAD_INTEGRITYIntegrity check on decrypted field failedTampering or network corruptionThe network path; repeated hits need a security review
0x26 KRB_AP_ERR_BADADDRNetwork address doesn't match the ticketIP address change, proxy or NATAddress translation between client and service
0x34 KRB_ERR_RESPONSE_TOO_BIGResponse too big for UDPInformational: Windows retries over TCPTCP 88 open to the DCs
0x3C KRB_ERR_GENERICGeneric errorGroup memberships overloading the PAC, recent password changes not yet replicated, an SPN too long or with too many partsThe user's group count and recent password changes

Smart cards and certificate mapping#

Code or eventMeaningUsual causeFirst check
0x3E KDC_ERR_CLIENT_NOT_TRUSTEDThe client trust failedSmart card certificate revoked, or its root CA isn't trusted by the DCRevocation status and the chain as seen from the DC
0x3F KDC_ERR_KDC_NOT_TRUSTEDThe KDC server trust failedThe client doesn't trust the CA behind the DC's certificateThe DC certificate chain from the client
0x40 KDC_ERR_INVALID_SIG / 0x41 KDC_ERR_KEY_TOO_WEAKInvalid signature / higher encryption level neededThe PKINIT request signature fails, or its Diffie-Hellman parameters are below KDC policyThe certificate and smart card middleware
Kdcsvc 39The Key Distribution Center (KDC) encountered a user certificate that was valid but could not be mapped to a user in a strong wayNo strong mapping and no SID extension in the certificate; in Enforcement mode authentication is deniedReissue from an updated CA (online templates add the SID extension) or add a strong explicit mapping. KB5014754

How to verify a fix#

  1. On the client, clear cached tickets and request the service again: klist purge for the user, or klist -li 0x3e7 purge for the computer account. klist get HTTP/app.contoso.com requests a ticket directly.
  2. klist lists a ticket for the SPN, and its KerbTicket Encryption Type is AES.
  3. On the DC, the matching 4769 shows Failure Code 0x0 and Ticket Encryption Type 0x12 or 0x11 (AES), the expected values on current systems.
  4. No new Kdcsvc 201 to 209 or 39 events name that account, and 4771 0x18 bursts from that Client Address have stopped.
  5. Turn Kerberos LogLevel off again on any machine where you enabled it.

Replication errors that wrap Kerberos failures (5, 1396, -2146893022) are in Active Directory replication errors; Kerberos problems with Microsoft Entra Seamless SSO are covered in Seamless SSO not working.

References#

Revision history: Oct 2026 — revised and re-checked against current documentation.

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)