function getSamlName(p) {
  // azure...
  if (CLAIMS.display_name in p) return p[CLAIMS.display_name];

  // The two below are not always available so lets hope display_name captures that.
  /** @type string | undefined */
  const family_name = p[CLAIMS.family_name];
  /** @type string | undefined */
  const given_name = p[CLAIMS.given_name];

  if (family_name && given_name) {
    return `${given_name} ${family_name}`;
  }

  return undefined;
}
This should ne widely accaptable.
@param {import('passport-saml').Profile} p