diff --git a/authentik/providers/saml/processors/assertion.py b/authentik/providers/saml/processors/assertion.py index f441fe657..20e14e1bf 100644 --- a/authentik/providers/saml/processors/assertion.py +++ b/authentik/providers/saml/processors/assertion.py @@ -184,7 +184,7 @@ class AssertionProcessor: return name_id if name_id.attrib["Format"] == SAML_NAME_ID_FORMAT_TRANSIENT: # Use the hash of the user's session, which changes every session - session_key: str = self.http_request.user.session.session_key + session_key: str = self.http_request.session.session_key name_id.text = sha256(session_key.encode()).hexdigest() return name_id raise UnsupportedNameIDFormat(