SAML Login Error Redirects to Logout

bernard6
Mega Expert

I've setup our instance for SAML2 authentication and it is working.   Though if there is a problem logging in a user the error message for the issue is briefly displayed and then the user is quickly redirected to the /external_logout_complete.do page.   The redirect happens so quickly that a user wouldn't see the error and would only report that when they attempt to navigate to the page they are logged out.   As an example if a user had not been imported into the instance yet they would briefly be shown that their user was not found before it quickly redirected them to the logout page.   For the user is appears like they are just automatically logged out of the application.

I'm looking for a way to present the user with the error message so they are aware an issue occurred and can communicate that error to our Support Desk when they contact them for assistance.   Has anyone else worked around this behavior?

Thanks in advance,

David Bernard

1 ACCEPTED SOLUTION

Nia McCash
Mega Sage
Mega Sage

David,


If your user exists in the system (ie. if a user account exists for him/her in ServiceNow) then have a look at Redirecting user logins - UI Scripts, Login Rules, or Installation Exits



That page shows you how to modify the login script in order to redirect to a page where the error message can be shown.   You'll have to create the page.


View solution in original post

5 REPLIES 5

Nia McCash
Mega Sage
Mega Sage

David,


If your user exists in the system (ie. if a user account exists for him/her in ServiceNow) then have a look at Redirecting user logins - UI Scripts, Login Rules, or Installation Exits



That page shows you how to modify the login script in order to redirect to a page where the error message can be shown.   You'll have to create the page.


What if the user doesn't exist in the system (User account does not exist in ServiceNow) - is there a way to define that behavior?


I posted this question Redirect SAML User Not Found Login   but unfortunately haven't received any answers.


Darn! Thanks -- I'll add a vote to it, since I'm in the same boat.