---
title: Generating a client secret for a resource
description: Generate a new client secret for a PingOne resource.
component: pingone
page_id: pingone:applications:p1_generate_client_secret_resource
canonical_url: https://docs.pingidentity.com/pingone/applications/p1_generate_client_secret_resource.html
llms_txt: https://docs.pingidentity.com/pingone/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-08-21T16:10:47Z
section_ids:
  steps: Steps
  choose-from: Choose from:
  result: Result
---

# Generating a client secret for a resource

For security reasons, change a resource's client secret on a regular basis. Learn more in [Rotating the client secret for a resource](p1_rotate_client_secret_resource.html).

## Steps

1. In the PingOne admin console, go to **Applications > Resources** and browse or search for the resource for which you want to generate the client secret.

2. Click the resource entry to open the details panel.

3. On the **Overview** tab, click **Generate New Secret**.

4. If you're generating a new secret for a custom resource, in the **Retain Previous Secret** list, select how long to retain the previous client secret:

   ### Choose from:

   * **Retain for 1 day**: The previous secret expires 24 hours after the creation of the new secret.

   * **Retain for 7 days**: The previous secret expires 7 days after the creation of the new secret.

   * **Retain for 30 days**: The previous secret expires 30 days after the creation of the new secret.

   * **Retain for custom timeframe**: Configure the secret to expire after a custom timeframe. For example, 14 days. The maximum retention period is 90 days.

   * **Do not retain previous secret**: The previous secret expires immediately. Users might experience sign-on errors until the resource is updated to use the new secret.

     |   |                                                                                                                                                                                                                                                                                                                                                                                                                                          |
     | - | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     |   | This setting can't be changed. If you're not sure how long you should retain the previous client secret, select **Retain for 30 days** or **Retain for custom timeframe** with the desired duration. If you don't need to keep the previous secret for that long, you can revoke it manually before the retention period expires. Learn more in [Revoking a client secret for a custom resource](p1_revoke_client_secret_resource.html). |

5. Select **I understand and would like to continue** and click **Confirm**.

## Result

PingOne generates a new client secret for the resource.
