SAML 2.0 troubleshooting

  • Release version: Yokohama
  • Updated January 30, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of SAML 2.0 troubleshooting

    This guide provides practical troubleshooting steps for common SAML 2.0 issues encountered in ServiceNow instances, especially focusing on the Yokohama release. It helps customers resolve authentication problems without immediately contacting support, emphasizing solutions validated within the ServiceNow knowledge base.

    Show full answer Show less

    Common Issues and Solutions

    • Error: "is not a function."

      This error typically appears in multi-node environments when the SAML plugin is not activated on all nodes, causing missing code due to unloaded .jar files. The recommended solution is to contact Technical Support to restart the affected nodes to ensure the plugin loads correctly.

    • SAML does not authenticate CMS pages

      By default, CMS pages are public and bypass authentication. To enable SAML authentication on CMS pages, change the viewcontent.do public page setting from active=true to active=false.

    • Cannot redirect users back to CMS pages after SAML authentication

      SSO uses a URL parameter called URI to redirect post-authentication but does not support relative URLs such as /ess. Instead, deep linking with URLs like /navto.do?uri=/ess is required, which loads the target page within the main navigation iframe rather than full page.

      If the CMS entry page is made private (viewcontent.do active=false), a customization is necessary in the Installation Exit login script to construct a RelayState parameter for proper redirection after IdP authentication.

    • SAML does not redirect users to the appropriate page after authentication

      To diagnose redirection issues, verify if the relay state parameter is correctly passed to and from the Identity Provider (IdP) during authentication. Use browser developer tools (e.g., Chrome DevTools, Firefox with HTTPfox) or third-party tools like Fiddler for Internet Explorer to inspect HTTP requests and POST data.

    Important Notes

    • The instance does not support troubleshooting solutions from external sites; always refer to ServiceNow’s official knowledge base articles.
    • Understanding and managing deep linking behavior and relay state parameters are crucial for seamless user redirection when using SAML with CMS pages.

    Before contacting support, try the troubleshooting solutions available in the knowledge base on Hi.

    Note:
    The instance does not support solutions provided by external sites.

    To know more, see the KB0759251.

    Table 1. Other Common Issues
    Error or Symptom Solution
    Error message: "is not a function."

    This issue might occur in a multi-node environment. If the plugin does not get activated on all nodes, an error like the following appears:

    org.mozilla.javascript.EcmaError: [JavaPackage org.opensaml.saml2.core.impl.AuthnRequestBuilder] is not a function.

    This error occurs because the plugin was not active and did not load the .jar file. Therefore, the code appears to be missing. Contact Technical Support to restart nodes that are missing the plugin.
    SAML does not authenticate users accessing CMS pages. By default, CMS pages are public and therefore do not require authentication. If you want SAML to authenticate CMS pages, change the view_content.do public page from active=true to active=false.
    Cannot redirect a user back to a CMS page after SAML authentication. By default, the SSO integration uses a URL parameter called URI to control where the user is directed after authentication at the IdP. SSO ignores relative URLs. For example, SSO cannot redirect users to a /ess relative URL. Instead, the user has to navigate to a URL such as /nav_to.do?uri=/ess, which uses deep linking syntax.

    However, this puts the ESS portal inside the main navigation content IFrame. In other words, the site does not take up the full page, but rather loads as a page in your instance. For more information, see CMS Sites and Single Sign-On.

    If you change the CMS entry page to make it private by setting view_content.do to active=false, deep linking behavior then requires a customization to the Installation Exit login script. Create a script that looks for the URI portion of the URL and constructs a RelayState URL parameter containing the relative URL path to redirect users after authenticating at the IdP.

    SAML does not redirect users to the appropriate page after authentication. Determine if the relay state is passed out to the IdP and then passed back during authentication. You can do this with a browser capable of saving HTTP request headers and POST info, such as Chrome with its built-in developer tools, or Firefox with the add-on called HTTPfox. For Internet Explorer, use a third-party application such as Fiddler. The goal is to watch the requests pass from the client (browser) to the instance, and from the client to the IdP.