---
title: Step 2. Configure connection properties
description: Explains how to configure the connection properties in the sample app for the Android OIDC sign-on module tutorial with PingFederate.
component: orchsdks
page_id: orchsdks:oidc:try-it-out/android/pingfed/02_configuring-sample-for-pingfed
canonical_url: https://developer.pingidentity.com/orchsdks/oidc/try-it-out/android/pingfed/02_configuring-sample-for-pingfed.html
revdate: Thu, 2 Apr 2026 11:33:37 +0100
keywords: ["OAuth 2.0", "OpenID Connect", "Tutorial", "Source Code", "Integration", "SDK", "Android", "PingFederate", "connection properties"]
---

# Step 2. Configure connection properties

[icon: circle-check, set=far]PingFederate [icon: android, set=fab]Android

* [Prepare](00_before-you-begin.html)

* [Download](01_download-sample-repo.html)

* **Configure**

* [Run](03_running-sample-pingfed.html)

In this step, you configure the kotlin-oidc sample to connect to the OAuth 2.0 application you created in PingFederate, using OIDC sign-on.

1. In Android Studio, open the `sdk-sample-apps/android/kotlin-oidc` project you cloned in the previous step.

2. In the Project pane, switch to the Android view.

3. In the Android view, navigate to **oidc > kotlin+java > com.pingidentity.samples.oidc.app**, and open `CentralizeLoginViewModel.kt`.

4. Locate the `OidcWebClient` object and update with the values from your PingFederate tenant:

   ```kotlin
   val web by lazy {
       OidcWebClient {
           logger = Logger.STANDARD
           module(Oidc) {
               clientId = "sdkPublicClient"
               discoveryEndpoint = "https://pingfed.example.com/.well-known/openid-configuration"
               scopes = mutableSetOf("openid", "email", "address", "profile")
               redirectUri = "com.example.demo://oauth2redirect"
           }
       }
   }
   ```

   * *clientId*

     The client ID from your OAuth 2.0 application in PingFederate.

     For example, `sdkPublicClient`

   * *discoveryEndpoint*

     The `.well-known` endpoint from your PingFederate tenant.

     > **Collapse: How do I form my PingFederate .well-known URL?**
     >
     > To form the `.well-known` endpoint for a PingFederate server:
     >
     > 1. Log in to your PingFederate administration console.
     >
     > 2. Navigate to **System** [icon: angle-right, set=fa] **Server** [icon: angle-right, set=fa] **Protocol Settings**.
     >
     > 3. Make a note of the **Base URL** value.
     >
     >    For example, `https://pingfed.example.com`
     >
     >    |   |                                   |
     >    | - | --------------------------------- |
     >    |   | Do not use the admin console URL. |
     >
     > 4. Append `/.well-known/openid-configuration` after the base URL value to form the `.well-known` endpoint of your server.
     >
     >    For example, `https://pingfed.example.com/.well-known/openid-configuration`.
     >
     >    The SDK reads the OAuth 2.0 paths it requires from this endpoint.

   * *scopes*

     The scopes you added to your OAuth 2.0 application in PingFederate.

     For example, `"openid", "email", "address", "profile", "phone"`

   * *redirectUri*

     The `redirect_uri` as configured in the OAuth 2.0 client profile.

     This value must exactly match a value configured in your OAuth 2.0 client.

     For example, `com.example.demo://oauth2redirect`

5. Save your changes.
