You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NegotiateAuthentication failed authentication doesn't notify of TargetUnknown #126337
When attempting to initialize the security context, on Windows, if the native error code returned is SecurityStatusPalErrorCode.TargetUnknown, this is currently mapped to NegotiateAuthenticationStatusCode.GenericFailure. On unix, the equivalent error(s) would be the major error code is GSS_S_FAILURE, the minor error code is KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN. This also gets mapped to GenericFailure.
Reproduction Steps
No minimal repro possible as requires server/client infrastructure in a domain
Expected behavior
If a non-existent SPN is specified as the target, the NegotiateAuthenticationStatusCode statusCode should be TargetUnknown (value 14).
Actual behavior
You will get NegotiateAuthenticationStatusCode.GenericFailure returned
Regression?
No, just an omission in the original implementation.
Activity
dotnet-policy-service commentedon Mar 30, 2026
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.