After logging in via the Service Portal, user is redirected to 'modalLogin'.Description<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } ul{ list-style: disc outside none; margin-left: 0; } li { padding-left: 1em; } --> Symptoms After using the Service Portal to log into the instance, the relay URL sends the user to a page called 'modalLogin'. Expected behavior is that the user is redirected to nav_page. Cause The 'Stock Header' widget has an angular ng-template called 'modalLogin'. If the template is no longer associated to the widget, instead of calling the template, the widget tries to navigate to 'modalLogin', which adds that to the Relay State. After getting authenticated, the user is sent back to the 'modalLogin' page. Resolution In the Service Portal, the header bar which contains the 'Login' link is called the "Header Widget" -- it is a widget specifically designed to be the Service Portal's header. Out-of-box, this widget is called "Stock Header" and can be found in the sp_widget table. The reference field which determines which widget the Service Portal uses is found in the Portal's Theme. To get there: 1. Determine which Service Portal the user is accessing. You can do this by looking at the URL and finding the suffix given after the .com. For example, demonightlykingston.service-now.com/sp?id=sc_home is using the 'sp' Service Portal. 2. Go to the sp_portal list. Search "URL Suffix". 3. Open the record. There's a reference field called 'Theme'. Open that record, which takes you to sp_theme record. 4. Check the 'Header' reference field. Out-of-box, you'll see 'Stock Header'. But the customer may have modified it. To determine if the Header Widget is using the expected Angular Template: 1. Open up the Header Widget. Scroll down to the bottom of the page. 2. Check the 'Angular ng-templates' related list. For the Stock Header widget, there should be a record called 'modalLogin'. If the record is missing: Go to the sp_ng_template list and search for 'modalLogin'. If you find the record, open it up and check the 'Widget' reference field. Angular Templates are not many-to-many, so there must exist one record per widget. If the customer clones the 'Stock Header' widget, they will also have to either: - Create a new Angular ng-template, with a new name. Because the widget calls 'modalLogin' by name, a line in the Client controller must also be changed. The function is here: $scope.openLogin = function () { $scope.modalInstance = $uibModal.open({ templateUrl: 'modalLogin', scope: $scope }); If the 'modalLogin' sp_ng_template record does not exist, you can import it from out-of-box. Edit the 'Widget' reference field to reference the Header Widget being used when the user clicks 'Login'. -- The issue specifically is that the widget tries to open a modal window called 'modalLogin'. The widget is expected to have the angular template. If that angular template does not exist, then the widget tries to navigate to 'modalLogin' via URL -- which attaches itself to the relay state. When the user is authenticated, the relay state brings them to 'modalLogin'.