@@ -104,7 +104,10 @@ private void initializeConfiguration() {
104104 "givenName" ,
105105 "familyName" ,
106106 "firstName" ,
107- "lastName" );
107+ "lastName" ,
108+ "http://schemas.microsoft.com/identity/claims/displayname" ,
109+ "displayName" ,
110+ "name" );
108111 }
109112 }
110113
@@ -352,18 +355,6 @@ public void handleLogout(HttpServletRequest req, HttpServletResponse resp) {
352355 */
353356 private String extractDisplayNameFromSamlAttributes (Auth auth ) {
354357 try {
355- // DIAGNOSTIC: Log ALL available SAML attributes (debug only to avoid logging PII in
356- // production)
357- Map <String , List <String >> allAttributes = auth .getAttributes ();
358- LOG .debug ("[SAML] ALL available SAML attributes from IdP:" );
359- if (allAttributes != null && !allAttributes .isEmpty ()) {
360- for (Map .Entry <String , List <String >> entry : allAttributes .entrySet ()) {
361- LOG .debug ("[SAML] Attribute: '{}' = {}" , entry .getKey (), entry .getValue ());
362- }
363- } else {
364- LOG .warn ("[SAML] No attributes received from SAML assertion!" );
365- }
366-
367358 // Convert SAML attributes to claims map (case-insensitive)
368359 Map <String , Object > claims = new TreeMap <>(String .CASE_INSENSITIVE_ORDER );
369360
@@ -390,11 +381,8 @@ private String extractDisplayNameFromSamlAttributes(Auth auth) {
390381
391382 if (displayName == null ) {
392383 LOG .warn (
393- "[SAML] Could not construct display name from attributes. " + "Available: {} = {}" ,
394- claims .keySet (),
395- claims );
396- } else {
397- LOG .info ("[SAML] Extracted display name: '{}'" , displayName );
384+ "[SAML] Could not construct display name from attributes. " + "Available keys: {}" ,
385+ claims .keySet ());
398386 }
399387
400388 return displayName ;
0 commit comments