diff --git a/ZB.MOM.WW.Auth/src/ZB.MOM.WW.Auth.Abstractions/Ldap/LdapContracts.cs b/ZB.MOM.WW.Auth/src/ZB.MOM.WW.Auth.Abstractions/Ldap/LdapContracts.cs index 95a2527..ec397bf 100644 --- a/ZB.MOM.WW.Auth/src/ZB.MOM.WW.Auth.Abstractions/Ldap/LdapContracts.cs +++ b/ZB.MOM.WW.Auth/src/ZB.MOM.WW.Auth.Abstractions/Ldap/LdapContracts.cs @@ -42,8 +42,14 @@ public sealed record LdapOptions /// /// only: the simple-bind identity, with {0} replaced by the - /// normalised login name — e.g. {0}@example.com (UPN) or EXAMPLE\{0}. Must contain - /// {0} exactly once. + /// normalised login name. Must contain {0} exactly once. + /// + /// Prefer the down-level form EXAMPLE\{0}: it maps exactly to the sAMAccountName the + /// group search uses, so the account that binds is the account whose groups are read. A UPN + /// template ({0}@example.com) is only correct where every account's UPN prefix equals its + /// sAMAccountName — AD resolves a UPN bind against the explicit userPrincipalName, so + /// a mismatch can fail sign-in or bind a different account than the one whose groups are read. + /// /// public string UserBindTemplate { get; init; } = "";