> For the complete documentation index, see [llms.txt](https://docs.theconfigteam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.theconfigteam.com/prebilt-for-pm/installation-guide/single-sign-on.md).

# Single Sign On

This guide explains how PreBilt utilises SAP's web application Single Sign-On (SSO) to provide seamless authentication. This follows a similar setup to the [Hosted UI Deployment](/prebilt-for-pm/installation-guide/frontend-preparation.md) but with a few minor differences.

## System requirements

* UI5 add-on installed&#x20;
* Sufficient authorisation to execute `/UI5/UI5_REPOSITORY_LOAD`&#x20;
* Transport creation authorisation (transactions *SE09* and *SE10*)&#x20;
* SICF administration authorisation

## Frontend changes

PreBilt is designed to authenticate via SAP username and password by default. To enable SSO, some minor changes to the frontend application must be made.

### Changes to index.html

Remove this section of code so that the standard PreBilt login menu is not displayed:

```
// If NOT Movilizer, then shor the login immediately
if (tctm_settings.platform !== "Movilizer") {
    //Hide menu, Show login
    document.getElementByID("content").style.display = "none";
    document.getElementByID("content_login").style.display = "";
    document.getElementByID("login_username").focus();
}
```

<figure><img src="https://content.gitbook.com/content/qBP5jPBMU6aAm13aXMtE/blobs/RMJfJejpyGgERbB24ued/image.png" alt=""><figcaption></figcaption></figure>

Add a call to <kbd>doLogin()</kbd>. This will load the main menu immediately as the user has been logged in via Single Sign On by this point:

<figure><img src="https://content.gitbook.com/content/qBP5jPBMU6aAm13aXMtE/blobs/bJkucLMTjtplhTkhiKba/image.png" alt=""><figcaption></figcaption></figure>

### Changes to tctm\_apps.js

Logging out of the application should be handled in the logout function in tctm\_apps.js. This can vary based on the Single Sign On provider. As an example, when using Microsoft Entra a redirect to the Entra sign out page can be used. This URL should contain the actual tenant id.

<figure><img src="https://content.gitbook.com/content/qBP5jPBMU6aAm13aXMtE/blobs/MmT6pYhG2ldYL4di5BtA/image.png" alt=""><figcaption></figcaption></figure>

### Changes to tctm\_settings.js file

As with the Hosted UI deployment, you need to edit the "tctm\_settings.js" file before you upload into SAP.

Set the path in the `tctm_settings.js` file (found in the "js" folder) to be a relative URL. This means the URL will be correct throughout the SAP landscape. Replace the given path URL with the relative ICF service that has already been created. e.g. "/tctm\_wm".

The PreBilt transaction to be used for the login should also be updated from the supplied "*PB2\_LOGIN\_LOGOUT\_MNU*" to the proposed client transaction - typically the "*PB2*" prefix is replaced with a client specific code. See the page for [Transaction codes](/prebilt-for-pm/configuration-guide/transaction-codes.md) in the Configuration Guide section.

Blank out the system ID and the client values as shown.

No need to edit the screen message as this will not be seen.

<div align="left"><figure><img src="https://content.gitbook.com/content/qBP5jPBMU6aAm13aXMtE/blobs/dgGLh3HwPYMtldYZeFzW/Screenshot%202026-03-26%20084553.jpg" alt=""><figcaption></figcaption></figure></div>

## ICF service changes

The `tctm_wm` ICF service is configured by default to use “Alternative Logon Procedure”. This should be changed to “Standard” to enable Single Sign On. This is typically done by copying the node to the customer namespace. The path in `tctm_settings.js` should be changed to point to this new ICF node.

## Deployment

### Access the upload program&#x20;

* &#x20;Log into SAP GUI
* Navigate to transaction *SE38*&#x20;
* Enter program name: /UI5/UI5\_REPOSITORY\_LOAD&#x20;
* Click 'Execute' (F8)&#x20;

### &#x20;Configure upload parameters&#x20;

On the selection screen, enter: &#x20;

* Name of the BSP Application: Your application name, `ZTCTM_WM_UI`&#x20;
* Description: Brief description of your application&#x20;
* Package: The transport package, usually `ZTCTM_WM`&#x20;
* Workbench Request: Your transport request number&#x20;
* External Codepage: Blank or UTF-8 (typically)&#x20;
* Folder with Application Data: Browse to the local folder you have prepared with the front end files, typically `TCTM_WM_UI`&#x20;

### &#x20;Execute the upload&#x20;

&#x20;Review all parameters and press 'Execute' (F8). The program will: &#x20;

* Create the BSP application if it doesn't exist&#x20;
* Upload all files from your local folder&#x20;
* Register the application in the SAP repository&#x20;

### Verify the upload&#x20;

* &#x20;Go to transaction *SE80*&#x20;
* Select "**BSP Application**" from the dropdown&#x20;
* Enter your BSP application name&#x20;
* Check that all files are uploaded correctly&#x20;

&#x20;

## Test Your Application &#x20;

* Navigate to transaction *SICF*&#x20;
* Find your service under: sap/bc/ui5\_ui5/sap/ztctm\_wm\_ui&#x20;
* Right-click and select "Test Service"&#x20;
* Your Fiori app should open in a browser&#x20;

## Testing & Troubleshooting&#x20;

PreBilt uses the existing Single Sign On settings configured in SAP for web applications. The existing setup can be tested and inspected by running an existing web application such as Fiori Launchpad. Single Sign On is a broad term that covers many technologies and as such can vary from customer to customer.&#x20;

### &#x20;Checking Customer-Specific Settings in SICF&#x20;

Accessing Fiori Launchpad Configuration:

1. Navigate to SICF &#x20;

* Enter transaction code: *SICF*&#x20;
* This opens the HTTP Service Hierarchy Maintenance&#x20;

2. Locate Fiori Launchpad Service &#x20;

* Navigate to: /sap/bc/ui2/flp&#x20;
* Or search using Ctrl+F for "flp"&#x20;
* The main Fiori Launchpad service node&#x20;

3. Check service configuration &#x20;

* Right-click on the service node&#x20;
* Select "Display Service"&#x20;
* Review the configuration tabs&#x20;

### Key Configuration Areas to Check&#x20;

#### Logon Data Tab&#x20;

This tab reveals the authentication method:&#x20;

* Procedure: Shows active authentication method &#x20;
* Standard SAP Logon&#x20;
* Alternative Logon Procedure&#x20;
* SSO Authentication&#x20;
* Security Requirement: SSL requirements&#x20;
* Logon Procedure List: Priority of authentication methods&#x20;

Security Requirements&#x20;

* SSL: Whether HTTPS is mandatory&#x20;
* Client Certificate: Certificate requirements&#x20;
* Standard/Service User: Default user configurations&#x20;

Error Pages Tab&#x20;

* Custom error pages for authentication failures&#x20;
* Redirect URLs for SSO scenarios&#x20;
* Customer-specific messaging&#x20;

#### Handler List Tab&#x20;

Check for custom handlers:&#x20;

* CL\_HTTP\_EXT\_SAML2 - SAML authentication&#x20;
* CL\_HTTP\_EXT\_KERBEROS - Kerberos/SPNEGO&#x20;
* Custom handler classes - Customer-specific implementations&#x20;

### Identifying Customer-Specific Configurations&#x20;

#### System-Wide Settings&#x20;

Check these transactions for global SSO configuration:&#x20;

1. SAML2 - SAML 2.0 Configuration &#x20;

* Local Provider settings&#x20;
* Trusted Providers&#x20;
* Identity Provider connections&#x20;

2. STRUST - Trust Manager &#x20;

* SSL certificates&#x20;
* Certificate-based authentication&#x20;
* PSE management&#x20;

3. SICF\_SESSIONS - Session Management &#x20;

* Session timeout settings&#x20;
* Cookie configurations&#x20;
* Security session parameters&#x20;

4. SSO2 - Generate SAP Logon Ticket &#x20;

* Ticket validity&#x20;
* System PSE&#x20;
* Access control lists&#x20;

#### Common Customer Variations&#x20;

1. Multi-Factor Authentication &#x20;

* Additional authentication steps&#x20;
* Integration with MFA providers&#x20;
* Custom challenge handlers&#x20;

2. Session Management &#x20;

* Timeout variations&#x20;
* Re-authentication requirements&#x20;
* Session persistence settings&#x20;

3. URL Parameters &#x20;

* Custom URL parameters for SSO&#x20;
* Deep linking configurations&#x20;
* Target system parameters&#x20;

4. Browser Requirements &#x20;

* Specific browser configurations&#x20;
* Cookie settings&#x20;
* JavaScript requirements&#x20;

### Troubleshooting Tips&#x20;

#### Check Authentication Flow&#x20;

1. Enable HTTP trace in *SICF*&#x20;
2. Review ICM logs (SMICM)&#x20;
3. Check security audit log (*SM20*)&#x20;
4. Review system log (*SM21*)&#x20;

#### Testing Authentication&#x20;

1. Use SICF "Test Service" with different browsers&#x20;
2. Check with and without existing sessions&#x20;
3. Test from different network zones&#x20;
4. Validate with various user types&#x20;

Remember that each implementation can be unique based on their security requirements, existing infrastructure, and compliance needs. Always document findings and coordinate with the security team when making changes to authentication configurations.&#x20;
