From 9090b1b5112f3bd45148190dda6606521af31c13 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Thu, 1 Oct 2026 01:27:55 -0400 Subject: [PATCH] docs(auth): prefer the down-level UserBindTemplate; warn on UPN templates (I1) --- .../ZB.MOM.WW.Auth.Abstractions/Ldap/LdapContracts.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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; } = "";