diff --git a/backend/core/saml2.py b/backend/core/saml2.py index 9257e22..9dea3fc 100644 --- a/backend/core/saml2.py +++ b/backend/core/saml2.py @@ -19,6 +19,8 @@ def _update_user(self, user, attributes: dict, attribute_mapping: dict, force_sa names = display_name.split() user.first_name = names[0] user.last_name = names[-1] + user.save() # saving in case of new user, the profile is linked. + user.profile.display_name = display_name user.save() diff --git a/backend/pzserver/settings.py b/backend/pzserver/settings.py index c13b68f..e03e99c 100644 --- a/backend/pzserver/settings.py +++ b/backend/pzserver/settings.py @@ -359,7 +359,7 @@ LOGIN_REDIRECT_URL = "/" SAML_ATTRIBUTE_MAPPING = { - "eduPersonPrincipalName": ("username",), + "eduPersonUniqueId": ("username",), "sn": ("name",), "cn": ("full_name",), "email": ("email",),