Identify the exact SPN in Kerberos Event ID 4, then query that SPN forest-wide rather than relying only on the SPN list displayed for the expected server or service account.
KRB_AP_ERR_MODIFIED means the target could not decrypt the service ticket; duplicate SPNs are only one possible cause. An SPN assigned to the wrong account, use of an unexpected DNS alias, an account-key mismatch, clock skew, or an encryption-type mismatch can produce the same error.^1^
1. Find the SPN that is actually failing
On the affected client:
- Open Event Viewer → Windows Logs → System.
- Find Kerberos, Event ID 4 for the failed connection.
- Record:
- Server name
- Target name/SPN, such as
TERMSRV/host.contoso.com, HOST/host.contoso.com, or cifs/host.contoso.com
- Any related Kerberos or KDC events from the same timestamp
Run the ticket test from the affected user’s session—not from a different administrator session:
klist
klist get <service-class>/<exact-hostname>
klist
Use the exact hostname or alias used by the AVD client or application. A ticket requested for the server’s canonical name does not validate a connection made through an alias.
2. Search for the exact SPN across AD
From an elevated command prompt on a domain controller:
setspn -Q <exact-SPN>
setspn -L <DOMAIN\ExpectedAccount>
For multiple trusted forests, run:
setspn -X <exact-SPN>
The requested SPN must resolve to the account that actually runs the service. Depending on the service, that can be the session host’s computer account or a custom service account. A custom-account SPN must be unique across the forest—and across associated forests in a multi-forest environment. Microsoft documents Enterprise Administrator permissions for these searches.^2^
If the SPN is on the wrong account, correct only that entry:
setspn -D <exact-SPN> <WrongAccount>
setspn -S <exact-SPN> <CorrectAccount>
Use -S, not -A, because -S checks for duplicates before adding. Removing the wrong SPN is potentially disruptive, so first verify which identity the target service is currently running under. An SPN on the wrong AD object causes the KDC to encrypt the ticket with that object’s key, which the actual server cannot decrypt.^3^
3. Check whether the client is reaching a different computer
From both the affected AVD session host/client and the target server, test the exact name from Event ID 4:
nslookup <exact-target-name>
nltest /dsgetdc:<domain-name> /force /kdc
Check for:
- A stale DNS record
- A CNAME or load-balanced name resolving to an unintended host
- Short name and FQDN resolving differently
- An alias used by the application but absent from the intended SPN
- Inability of either system to locate a domain controller
Microsoft’s Kerberos checklist specifically calls for validating DNS from both the client and target, domain-controller availability, time synchronization, related events, and required network paths.^1^
4. If this AVD deployment uses Microsoft Entra Kerberos
This branch applies only if the connection uses a Cloud TGT or Microsoft Entra Kerberos—not ordinary AD DS Kerberos. In the affected user’s AVD session, run:
dsregcmd /status
klist cloud_debug
klist get <service-class>/<server-fqdn>
klist
Review AzureAdPrt, CloudTgt, and—where applicable—OnPremTgt. If a valid service ticket is issued but the resource rejects it with KRB_AP_ERR_MODIFIED, check:
- Whether the SPN belongs to the correct AD DS account
- Whether an alias changed the requested SPN
- Whether the synchronized Microsoft Entra Kerberos resource key still matches the current AD DS account key, particularly after an account-password change
Ticket issuance alone does not prove the resource can decrypt the ticket. Microsoft Entra Kerberos documentation identifies stale synchronized resource keys as a distinct conditional cause.^4^
If the SPN ownership, DNS target, ticket flow, and keys are all correct, correlate the client, session host, target server, and domain-controller Kerberos events for one failed attempt. Pay particular attention to Event IDs 4, 14, 16, and 27, because they distinguish decryption failures from clock and encryption-type problems.^1^
References
- Kerberos authentication troubleshooting guidance
- Kerberos generates KDC_ERR_S_PRINCIPAL_UNKNOWN or KDC_ERR_PRINCIPAL_NOT_UNIQUE error
- Kerberos Service Principal Name on Wrong Account
- Troubleshoot Microsoft Entra Kerberos