Fixing Double-Hop Kerberos With Constrained Delegation
Resource-based constrained delegation replaces SPN-bound trust chains, fixing Kerberos double-hop failures without domain-wide delegation risk.

In this guide
Table of Contents
Table of contents
A front-end IIS server authenticates a user successfully via KerberosThe KBY LexiconKerberosKerberos defines identity through time-limited tickets issued by a Key Distribution Center, not through passwords sent over the network. This entry sets out its definition, architecture relationship and a bounded validation workflow. , then makes a call to a back-end SQL Server or SharePoint API on that user’s behalf, and the request silently falls back to anonymous or the application pool identity. No error, no audit trail explaining why. This is the Kerberos double-hop problem, and in any enterprise running multi-tier services, it eventually forces a choice between weakening the trust boundary with unconstrained delegation or correctly implementing constrained delegation at the resource level. Most teams pick the former because it is faster to configure and just as fast to get flagged in a penetration test. This article covers the architecture and implementation of resource-based constrained delegation (RBCD), the mechanism that should have replaced classic delegation models years ago in any domain that still cares about lateral movement risk.
#The Problem: Why Kerberos Breaks on the Second Hop
Kerberos tickets are scoped to a single service principal. When a client authenticates to Service A, the ticket-granting service (TGS) issues a service ticket valid only for A’s SPN. If A then needs to call Service B while impersonating the original user, it has no ticket to present, because the user’s ticket was never issued for B. NTLM cannot solve it either: NTLM has no delegation mechanism, so a server that authenticated a client with NTLM cannot pass that authentication on to a next hop (only Kerberos protocol transition can bridge it), and multi-tier deployments that quietly downgrade to NTLM lose delegation and mutual authentication alike.
Microsoft’s answer, long before RBCD existed, was classic constrained delegation (KCD), configured via the msDS-AllowedToDelegateTo attribute on the front-end service account. This works, but it has two structural weaknesses: configuring the front-end account requires SeEnableDelegationPrivilege (the "Enable computer and user accounts to be trusted for delegation" user right, which only Administrators hold on domain controllers by default), and Microsoft’s constrained delegation overview states that it restricts the account to a single domain. The cross-domain delegation that arrived with Windows ServerThe KBY LexiconWindows ServerWindows Server is Microsoft's server operating system family, providing directory, network and application services as installable roles.
2012 is resource-based constrained delegation, configured on the back-end account; it did not extend msDS-AllowedToDelegateTo across domains or forests. In large enterprises running federated AD forests or per-business-unit domains, that second limitation is the one that actually breaks production.
#Architectural Breakdown: S4U2Self and S4U2Proxy
Constrained delegation is built on two Kerberos extensions defined in MS-SFU: Service-for-User-to-Self (S4U2Self) and Service-for-User-to-Proxy (S4U2Proxy).
- S4U2Self allows a service to request a Kerberos ticket to itself on behalf of a user, without that user presenting credentials directly. This is how the front-end obtains a usable ticket for the user’s identity even when the initial connection came in over NTLM or a non-Kerberos channel (protocol transition). With classic KCD this only works when the front-end account is set to "Use any authentication protocol" (
TrustedToAuthForDelegation); otherwise the S4U2Self ticket is not forwardable and the S4U2Proxy step fails. RBCD differs here: MS-SFU specifies that for resource-based constrained delegation the KDC can accept a non-forwardable S4U2Self ticket in the S4U2Proxy request, so protocol transition works without that setting when the back-end’smsDS-AllowedToActOnBehalfOfOtherIdentitylists the front-end. Classic KCD gives no such allowance. With either model, a user marked "Account is sensitive and cannot be delegated", or a member of Protected Users, is never delegated. - S4U2Proxy takes that ticket and exchanges it, via the KDC, for a service ticket to the back-end resource, provided the delegation relationship is authorised.
The critical architectural shift with resource-based constrained delegation is where that authorisation lives. Classic KCD stores the allow-list on the front-end account (msDS-AllowedToDelegateTo) — the delegating party controls who it can impersonate to. RBCD stores it on the back-end resource account, via msDS-AllowedToActOnBehalfOfOtherIdentity. The resource owner decides who is allowed to delegate to it. This inversion is what removes the cross-domain and privileged-write dependency: the back-end owner (who may sit in a different domain) can grant the relationship without needing rights over the front-end account at all.

Rendering diagram...
#Constrained Delegation vs Unconstrained and Classic KCD
| Model | Trust Scope | Cross-Domain Support | Privilege Required to Configure | Primary Risk |
|---|---|---|---|---|
| Unconstrained delegation | Any service, any resource | Within the forest; across a forest trust only where TGT delegation is enabled on the trust, which Windows blocks by default | SeEnableDelegationPrivilege (held by Administrators on domain controllers by default) | Full TGT theft on front-end compromise; effectively domain-wide impersonation |
| Classic constrained delegation (KCD) | Explicit SPN list on front-end | No: restricted to a single domain; cross-domain delegation from Windows Server 2012 onwards uses RBCD instead | SeEnableDelegationPrivilege plus write access to the front-end object | Front-end account misconfiguration grants broad SPN access |
| Resource-based constrained delegation (RBCD) | Explicit SID list on back-end | Yes, across domains and forest trusts (requires Windows Server 2012 or later domain controllers) | Write access to the back-end object’s delegation attribute only | Machine account takeover if RBCD combined with weak object ACLs |
#Implementation Logic
Deploying resource-based constrained delegation correctly follows a fixed sequence. Skipping the verification step is the single most common cause of “it works from my laptop but not from the load-balanced pool.”
- Identify the exact service account run as by the front-end (application pool identity, gMSA, or computer account) and its SID.
- Identify the back-end resource’s computer or service account object.
- Write the front-end SID into the back-end object’s
msDS-AllowedToActOnBehalfOfOtherIdentityattribute as a security descriptor. - Confirm the SPN registered against the back-end service matches exactly what the client requests (case and host-name form matter).
- Validate with a live ticket trace, not just a successful HTTPThe KBY LexiconHTTPHTTP is a stateless application-level protocol for request and response messages. Safe validation requires a bounded target and both protocol and application evidence. response — a silent NTLM fallback can mask a delegation failure entirely.
1# SQLSVC is the account that holds the back-end MSSQLSvc SPN. This example assumes
2# a gMSA (Get-/Set-ADServiceAccount); use Get-/Set-ADUser for a user account, or
3# Get-/Set-ADComputer if SQL Server runs as its computer account.
4$ErrorActionPreference = 'Stop' # any failure, including the backup, halts the script
5
6# -PrincipalsAllowedToDelegateToAccount REPLACES the existing list, so save the
7# current value and merge the new principal into it rather than overwriting.
8$backEnd = Get-ADServiceAccount -Identity "SQLSVC" -Properties PrincipalsAllowedToDelegateToAccount
9$before = @($backEnd.PrincipalsAllowedToDelegateToAccount | Where-Object { $_ })
10$before | Export-Clixml -Path .\SQLSVC-rbcd-before.xml
11
12# Add the front-end web server's computer account to the list
13$frontEnd = Get-ADComputer -Identity "WEB01"
14$merged = @($before + $frontEnd.DistinguishedName | Select-Object -Unique)
15Set-ADServiceAccount -Identity "SQLSVC" -PrincipalsAllowedToDelegateToAccount $merged
16
17# Verify the attribute was written correctly
18Get-ADServiceAccount -Identity "SQLSVC" -Properties PrincipalsAllowedToDelegateToAccount |
19 Select-Object -ExpandProperty PrincipalsAllowedToDelegateToAccount
20
21# Rollback: pass the saved $before list back to Set-ADServiceAccount ($null if it was empty)For gMSA-backed application pools, the front-end principal is the managed service account object rather than the computer account, and the web server’s computer account must already be listed in that gMSA’s PrincipalsAllowedToRetrieveManagedPassword before any of this matters — a separate but frequently confused chain.
1# Validate on the front-end host that a forwardable ticket
2# for the back-end SPN is actually being cached
3klist tickets | findstr /i "MSSQLSvc"
4
5# List failed service ticket requests: Security event 4769 with a non-zero Status
6# (the field the event text displays as Failure Code).
7# 4769 is logged on domain controllers, so run this on a DC (or query your SIEM).
8# It does not prove success or detect NTLM fallback; for that, enable NTLM
9# auditing and check event 4776 on DCs (or 8004 in the NTLM Operational log).
10Get-WinEvent -LogName Security -FilterXPath "*[System[EventID=4769] and EventData[Data[@Name='Status']!='0x0']]" -MaxEvents 20When troubleshooting event logs across domain boundaries, filter on the result code in event 4769: the event text shows it as Failure Code, and the event XML stores the same value in the Status field, which is what the XPath above matches. 0x20 (KRB_AP_ERR_TKT_EXPIRED) means an expired ticket, which clients normally renew and retry, so it rarely explains a delegation failure. 0xD (KDC_ERR_BADOPTION) is the one to chase: MS-SFU has the KDC return KRB-ERR-BADOPTION when it refuses an S4U2Proxy request, so a 0xD on a request from the front-end account usually means the delegation is not authorised for the requested service, which often traces back to a stale or missing SID in the back-end’s delegation attribute.
#Structuring the Trust Grant as Code
For teams managing this through infrastructure-as-code rather than ad hoc PowerShell, the delegation relationship should be declared alongside the resource definition, not the front-end. This mirrors the resource-owns-the-trust model of the underlying protocol and keeps the grant auditable in version control.
1{
2 "resourceAccount": "SQLSVC",
3 "allowedDelegators": [
4 {
5 "principal": "WEB01$",
6 "sid": "S-1-5-21-...-1104",
7 "justification": "Tier-2 API fan-out, ticket CHG0041233"
8 }
9 ],
10 "reviewCycleDays": 90
11}This structure feeds directly into a periodic access-review job — enumerate every account with a non-empty msDS-AllowedToActOnBehalfOfOtherIdentity and reconcile it against the declared manifest. Drift here is exactly the kind of silent privilege accumulation that architectural patterns for zero-trust identity are supposed to eliminate, and constrained delegation grants are one of the most under-audited object attributes in most AD environments precisely because they are invisible in the standard GUI tooling unless you know to look for them.

#Failure Modes and Edge Cases
Resource-based constrained delegation removes the cross-domain write dependency but introduces its own class of failure.
- Account recreation, migration and renames. The grant stores the front-end account’s SID, so a rename alone changes nothing. If the account is deleted and recreated, the new object has a new SID that the grant does not contain, and S4U2Proxy requests are refused until you grant the new account. If the account is migrated to another domain it gets a new primary SID; SID history may let the old SID still match, but do not rely on that: update the back-end’s grant to the new account as part of the migration and test delegation before SID history is removed.
- Claims stripping across forest trust. When RBCD spans a forest trust, Active Directory drops user and device claims entering the resource forest unless the trust has a claims transformation policy that allows them. Back-end resources that rely on claims-based authorisation rather than group membership will fail authorisation checks even though the Kerberos exchange itself succeeds.
- KDC round trips at scale. Every S4U2Proxy exchange is a ticket request to a domain controller. Under high fan-out (a front-end calling dozens of back-end microservices per request), those extra requests add latency per hop and load on the DCs handling them, so measure both in a pilot before rolling out widely.
- Protocol transition abuse. S4U2Self does not require the user to prove possession of credentials to the requesting service — this is by design, but it means any account granted delegation rights that is also compromised can impersonate any user to the resources it’s authorised against, without that user ever authenticating. This is why the back-end SID list must be reviewed with the same rigor as a privileged group membership, not treated as a low-risk plumbing setting.
#Scaling and Security Trade-offs
Rolling constrained delegation out fleet-wide surfaces trade-offs that don’t appear in a single-server proof of concept.
- Blast radius vs operational overhead: RBCD’s per-resource SID list is more granular than KCD’s per-front-end SPN list, but at scale (hundreds of back-end services) it means hundreds of individually-managed security descriptors rather than a centralised delegation table — automation is not optional past a handful of services.
- Cross-forest latency: RBCD across a forest trust uses cross-realm referrals, so each hop can need more KDC requests than same-domain delegation; for latency-sensitive synchronous call chains, measure the added latency in a pilot.
- Auditability: Unlike group-based access, delegation grants don’t appear in standard AD group membership reports. Security teams need a dedicated LDAP query or SIEM rule against
msDS-AllowedToActOnBehalfOfOtherIdentityto maintain visibility, or the grants become effectively invisible shadow trust relationships. - Migration risk: Moving from unconstrained to resource-based constrained delegation is not atomic — during the transition window, some front-ends may hold both an unconstrained flag and a resource-scoped grant, and removing the unconstrained flag prematurely breaks any legacy integration that was silently depending on it.
None of this makes RBCD optional in a modern AD estate that still runs multi-tier Windows services. Unconstrained delegation on a front-end account is functionally equivalent to storing a domain-wide impersonation key on whichever server happens to be compromised first, and every red-team engagement treats it as exactly that. Getting constrained delegation right — resource-owned, SID-audited, and reviewed on the same cadence as privileged group membership — is one of the few AD hardening tasks that directly closes a well-understood, frequently exploited lateral-movement path without requiring a platform migration or a new security product to operate it.
#Related reading
Evidence trail
Sources and verification
Primary documentation and external technical references used in this article.
About this page
Credited to
Dates
Published
Last updated
Read-only scripts
- Windows devices with no BitLocker recovery key in Entra IDMicrosoft Entra ID, Windows
- Intune devices that haven't synced in N daysMicrosoft Intune
- Mailboxes forwarding to external addressesExchange Online
- BitLocker status of every volume on this PCWindows
Upcoming deadlines
- Intune moves to macOS 15 and laterQ4 2026
- SAP SuccessFactors provisioning: move from basic auth to workload identityNovember 2026
- Intune November release: JIT registration reminder at APNs renewal and automatic JIT for eligible tenantsNovember 2026
Explore KBY
The KBY Brief
A short email about twice a week with new runbooks, configuration traps and fixes from KBY Technologies.
SubscribeRelated Engineering Labs
Related articles
Enterprise IT Management
Exchange Online 550 5.7.708 Access Denied: Fixing Blocked Mail Flow
How to diagnose Exchange Online 550 5.7.708: find the real source IP, check reputation and connectors, validate recovery and escalate to Microsoft with evidence.
Enterprise IT Management
Microsoft 365 Group Licensing: Fixing MutuallyExclusiveViolation
How to find the conflicting service plans behind a MutuallyExclusiveViolation, remove the overlap safely, and reprocess users in Microsoft 365 group-based licensing.
Enterprise IT Management
Continuous Control Monitoring for SOC 2 Audits
How AWS Config, Okta logs and GitHub audit events feed a continuous control monitoring pipeline that replaces manual SOC 2 evidence pulls.
Enterprise IT Management
Restricting Microsoft 365 Group Creation to an Approved Security Group
How to limit Microsoft 365 Group creation to one approved security group with the Group.Unified directory setting, including state capture, validation from both sides, failure modes and a tested rollback.
Discover more
Lexicon Definitions
Learn More About KBY
About KBY
Learn about our mission, how our content is produced, and how we handle corrections.
Why Trust KBY
How KBY content is produced, what is checked automatically, and how errors are corrected.
The KBY Brief
A short email about twice a week with new runbooks, configuration traps and fixes from KBY Technologies.
Was this useful?
Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.
Engineering insights, direct to you.
Receive the latest Systems Engineering tutorials, production guides, Engineering Labs and operational best practices.
Comments
Add a thoughtful note on Fixing Double-Hop Kerberos With Constrained Delegation. Comments are checked for spam and held for moderation before appearing.