The error occurs because the Mendix user doesn’t exist yet when SAML tries to create a session. Specifically, getIUser()
returns null, so calling isActive()
on it causes the crash.
Reason of Occurence:
On first login, the user isn't created yet.
The SAML module tries to use the user object too early.
On retry, the user is already created, so it works.
Way to Fix:
Enable "Create Mendix user if it doesn’t exist" in SAML configuration.
Check your ProcessAssertion
or AfterLogin
microflows – make sure you’re not calling getIUser().isActive()
before the user is provisioned.
Use latest SAML version if possible (3.6.8+ may fix this internally).
Refence Link : https://docs.mendix.com/appstore/modules/saml/