SAML 2.0 Error: Could not create session for the provided user principal

0
Hi,  I’ve been working on an issue where new users could not get into the app as when trying to commit the new users we got a validation error for Firstname, Surname and Email. I’ve checked the SAML response and the values are showing in the assertions, and I have also set up custom user provisioning to check that the values exist in the assertions and they do.  To troubleshoot I’ve removed the validation from the entity Administration.Account and tried again, this time I get the below error. Looking at the logs the SAML process gets through CustomUserProvisioning (I can see the manual log checks on the assertions I added to CustomUserProvisioning. But then get the error  SAML_SSO: Failed: Could not create a session for the provided user principal 'garion.swann@mencap.org.uk': null 10:42:23APPERRORSAML_SSO: Unable to validate Response, see SAMLRequest overview for detailed response. Error: Could not create a session for the provided user principal. 10:42:23APPERRORSAML_SSO: saml20.implementation.SAMLFeedbackException: Could not create a session for the provided user principal.   If anyone could advise that would be amazing! Thanks,  Garion 10:42:22APPINFOAAD Assertion: Group 29802c58-fafa-45c0-aa36-417e5bbe2ca0 not found in WMM database 10:42:22APPINFOSAML: Email found. 75c78f39-2b2e-46a0-a390-8155f15fec4b 10:42:23APPINFOSAML: Email found. Garion.Swann@mencap.org.uk 10:42:23APPINFOSAML: Givenname found. Garion 10:42:23APPINFOSAML: Surname found. Swann 10:42:23APPINFOSAML_SSO: Failed: Could not create a session for the provided user principal 'garion.swann@mencap.org.uk': null 10:42:23APPERRORSAML_SSO: Unable to validate Response, see SAMLRequest overview for detailed response. Error: Could not create a session for the provided user principal. 10:42:23APPERRORSAML_SSO: saml20.implementation.SAMLFeedbackException: Could not create a session for the provided user principal. 10:42:23APPINFOat saml20.implementation.ArtifactHandler.handleSAMLResponse(ArtifactHandler.java:161) 10:42:23APPINFOat saml20.implementation.ArtifactHandler.handleRequest(ArtifactHandler.java:33) 10:42:23APPINFOat saml20.implementation.SAMLRequestHandler.processRequest(SAMLRequestHandler.java:164) 10:42:23APPINFOat com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:76) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:73) 10:42:23APPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:79) 10:42:23APPINFOat com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:963) 10:42:23APPINFOat com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42) 10:42:23APPINFOat javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:867) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) 10:42:23APPINFOat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) 10:42:23APPINFOat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) 10:42:23APPINFOat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) 10:42:23APPINFOat org.eclipse.jetty.server.Server.handle(Server.java:502) 10:42:23APPINFOat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) 10:42:23APPINFOat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) 10:42:23APPINFOat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) 10:42:23APPINFOat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) 10:42:23APPINFOat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) 10:42:23APPINFOat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) 10:42:23APPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) 10:42:23APPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) 10:42:23APPINFOat java.base/java.lang.Thread.run(Unknown Source) 10:42:23APPINFOCaused by: java.lang.NullPointerException: null 10:42:23APPINFOat saml20.implementation.ArtifactHandler.handleSAMLResponse(ArtifactHandler.java:131) 10:42:23APPINFOat saml20.implementation.ArtifactHandler.handleRequest(ArtifactHandler.java:33) 10:42:23APPINFOat saml20.implementation.SAMLRequestHandler.processRequest(SAMLRequestHandler.java:164) 10:42:23APPINFOat com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:76) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:73) 10:42:23APPINFOat com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) 10:42:23APPINFOat com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:79) 10:42:23APPINFOat com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:963) 10:42:23APPINFOat com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42) 10:42:23APPINFOat javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:867) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) 10:42:23APPINFOat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) 10:42:23APPINFOat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480) 10:42:23APPINFOat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247) 10:42:23APPINFOat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) 10:42:23APPINFOat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) 10:42:23APPINFOat org.eclipse.jetty.server.Server.handle(Server.java:502) 10:42:23APPINFOat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364) 10:42:23APPINFOat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260) 10:42:23APPINFOat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) 10:42:23APPINFOat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) 10:42:23APPINFOat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) 10:42:23APPINFOat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) 10:42:23APPINFOat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) 10:42:23APPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765) 10:42:23APPINFOat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683) 10:42:23APPINFOat java.base/java.lang.Thread.run(Unknown Source)  
asked
1 answers
0

I had a similar problem caused by the fact that I changed the name attribute of System.User in the microflow of CustomUserProvisioning . As a result, the authenticated user (stored by its name) was not available anymore. Do you have a similar case?

answered