<h2>Frequently Asked Questions on redirection with service portal</h2><br/><div style="overflow-x:auto"><div><h3>Description</h3><style type="text/css"><!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } --></style> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p> <ol style="list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">I configured spEntryPage to send non-roled users to my service portal but they are still able to access the platform UI. What did I do wrong?<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">This is expected behavior. SPEntryPage will not make it impossible for a user to access UI16, it only ensures that by default they will reach the portal instead.<em><br /><br /></em></li></ol> </li><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">When a user tries to navigate to a portal other than the default portal before logging in, they are redirected to the default portal after login. Why?<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">This is just a limitation in the product. The design of the SPEntryPage logic does not account for multiple portal login scenarios.<br /><em><br /></em></li></ol> </li><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">After logging in and being properly redirected, users are able to access UI16 by opening a new tab and going to https://instancename.service-now.com or by opening ServiceNow from the chicklet in Okta. How do I prevent this?<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">This is expected behavior. The SPEntryPage script is currently only evaluated after a login operation is completed. If you need to restrict users from accessing the platform interface entirely please see the examples given in <a style="color: #0563c1; text-decoration: underline;" title="this article" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0687717" target="_blank" rel="noopener noreferrer">this article.</a><em><br /><br /></em></li></ol> </li><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">When opening a record link from an email, users are redirected to the platform interface after login. How can we send them to the service portal instead?<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">If you are using SSO make sure that the relay state is being properly preserved by the IDP. If not, then double-check that redirection is configured properly as described <a title="here" href="https://support.servicenow.com/kb_view.do?sysparm_article=KB0746730" target="_blank" rel="noopener noreferrer">here.</a><em><br /><br /></em></li></ol> </li><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">When a user logs out and then logs in again through the portal, they are redirected to the platform UI rather than the portal.<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">When you log in to ServiceNow, the platform tries its best to redirect you to the page you were trying to visit before logging in. In some cases, this leads to unexpected results. When you log out, the last page you request is typically logout.do and because of that, the system will redirect you to the platform since logout.do is not a service portal URL.<em><br /><br /></em></li></ol> </li><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">How do I debug redirection in Service Portal?<br /> <ol style="list-style-type: lower-alpha; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 0px; font-size: 12pt; font-family: Calibri, sans-serif;">To view debug output from SPEntryPage and see the session variables it redirects based on:<br /> <ol style="list-style-type: lower-roman; margin-bottom: 0in; margin-top: 0px; list-style-position: inside;"><li style="margin: 0in 0in 0.0001pt 12px; font-size: 12pt; font-family: Calibri, sans-serif;">Make sure the system property glide.entry.first.page.script has the value <strong>new SPEntryPage().getFirstPageURL()</strong>.</li><li style="margin: 0in 0in 0.0001pt 12px; font-size: 12pt; font-family: Calibri, sans-serif;">Open the SPEntryPage script include and find and set <strong>this.logVariables</strong> to <strong>true</strong>.</li><li style="margin: 0in 0in 0.0001pt 12px; font-size: 12pt; font-family: Calibri, sans-serif;">In a different browser (or "incognito" or "inPrivate" session), login.<br /> </li></ol> </li></ol> </li><li style="margin: 0in 0in 0.0001pt 12px; font-size: 12pt; font-family: Calibri, sans-serif;">The log output can be viewed by navigating to <strong>System Logs > System Log > All </strong>or by going directly to:</li></ol> <pre class="margin"><span style="font-family: Arial, sans-serif; color: #3a3f51;"> /syslog_list.do?sysparm_query=level%3D0%5EORDERBYDESCsys_created_on&sysparm_first_row=1&sysparm_view=</span></pre> <p style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri, sans-serif;"> </p></div></div>