---
title: Using the SP sample application
description: When accessed first, the service provider (SP) sample application simulates SP-initiated SSO and SLO scenarios. The application also provides a simulated target resource for SSO/SLO transactions initiated from the identity provider (IdP).
component: java
page_id: java:setup:pf_java_ik_using_the_sp_sample_application
canonical_url: https://docs.pingidentity.com/integrations/java/setup/pf_java_ik_using_the_sp_sample_application.html
revdate: June 21, 2024
section_ids:
  steps: Steps
---

# Using the SP sample application

When accessed first, the service provider (SP) sample application simulates SP-initiated SSO and SLO scenarios. The application also provides a simulated target resource for SSO/SLO transactions initiated from the identity provider (IdP).

## Steps

1. Start PingFederate.

2. In a web browser, open the sample application:

   https\://*\<pf\_host>*:*\<pf\_port>*/SpSample

   If you deployed the application elsewhere, modify the hostname accordingly. Learn more in [Advanced installation and configuration](pf_java_ik_advanced_installation_and_configuration.html).

3. If you customized your configuration by creating different IdP connections or deploying the SP application on a separate server, update the application configuration as shown in [SP sample application configuration reference](pf_java_ik_sp_sample_application_configuration_reference.html).

4. Click **Single Sign-On** to begin SP-initiated SSO.

   You are redirected to the IdP login page.

   |   |                                                                                                                                                                  |
   | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | If you are already signed on at the IdP, this step simply redirects back to this page, unless **Force Authn** is selected. Click **Single Logout** to try again. |

5. On the identity provider sign-on page, enter the following values:

   Username: `joe`

   Password: `test`

6. Click **Login**.

   Having completed an SP-initiated SSO, you are redirected back to the Service Provider main page, which now displays attributes sent from the IdP in the SAML assertion.

   ![hhr1563995436679](_images/hhr1563995436679.jpg)

7. Click **Single Logout** to begin an SP-initiated SLO transaction.

   Upon successful completion of this transaction, the service provider main page is shown again but without attributes listed.

   |   |                                                                                                                                                                                                                                                                                                                                          |
   | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | Clicking **Local Logout** in the top menu has the same effect. However, since you are still signed on at the IdP, if you click **Single Sign-On** again (either here or at the IdP), you are not required to reauthenticate. This page is redisplayed immediately with SSO attributes available from a new IdP-generated SAML assertion. |
