Issue
SSO authentication is working, but I see an angry Jenkins Oops! A problem occurred while processing the request, as well as NullPointerException
in the logs (below), after logging into my environment:
2024-10-16 15:24:43.675+0000 [id=3633663] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID ... java.lang.NullPointerException at org.jenkinsci.plugins.saml.SamlSecurityRealm.modifyUserSamlCustomAttributes(SamlSecurityRealm.java:405) at org.jenkinsci.plugins.saml.SamlSecurityRealm.doFinishLogin(SamlSecurityRealm.java:345
Resolution
This NullPointerException
indicates that the modifyUserSamlCustomAttributes()
method is returning a null or empty value. From the Operations Center SAML configuration, there will be empty values for SAML Attributes
under the Custom Attributes
section in your Manage Jenkins
> Configure Global Security
.
Delete this empty field box, if not being used, by clicking the red Delete
button, or the red X
on the right side of this box, then clicking Save
at the bottom of the page.

This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.