---
title: Adding an identity provider - X
description: Add X as an external identity provider in PingOne to allow users to sign on with X when accessing your application.
component: pingone
page_id: pingone:integrations:p1_add_idp_x_prereqs
canonical_url: https://docs.pingidentity.com/pingone/integrations/p1_add_idp_x_prereqs.html
revdate: May 29, 2025
page_aliases: ["p1_add_idp_twitter_prereqs.adoc", "p1_register_app_x.adoc", "p1_enable_email_x.adoc", "p1_get_api_key_x.adoc", "p1_add_idp_x.adoc", "p1_add_callback_url_x.adoc"]
section_ids:
  before-you-begin: Before you begin
  registering-the-application-with-x: Registering the application with X
  steps: Steps
  enabling-email-communication: Enabling email communication
  steps-2: Steps
  getting-the-api-key-and-api-secret: Getting the API key and API secret
  steps-3: Steps
  adding-x-as-an-identity-provider-in-pingone: Adding X as an identity provider in PingOne
  before-you-begin-2: Before you begin
  steps-4: Steps
  adding-the-callback-url-to-the-x-developer-site: Adding the callback URL to the X Developer site
  steps-5: Steps
  next-steps: Next steps
---

# Adding an identity provider - X

Adding X as an external identity provider (IdP) *(tooltip: \<div class="paragraph">
\<p>A service that manages identity information and provides authentication services to relying clients or SPs within a federated or distributed network.\</p>
\</div>)* gives your users the option to sign on with X when accessing your application.

## Before you begin

Ensure that you have:

* A PingOne organization with an environment added. Learn more in [Starting a PingOne trial](../getting_started_with_pingone/p1_start_a_p1_trial.html).

* Added your application to PingOne. Learn more in [Adding an application](../applications/p1_applications_add_applications.html).

* An X account

## Registering the application with X

To enable signing on with X, you must register your application with X.

### Steps

1. Go to the [X Developer site](http://developer.x.com) and sign on to your account.

   If you haven't created an X Developer account, you can do so now.

2. Click **Create an app**.

3. Enter the appropriate information.

4. Select **Enable sign in with X**.

5. Click **Create**.

## Enabling email communication

Enable email communication to retrieve a user's email address from X.

### Steps

1. Go to the [X Developer site](http://developer.x.com).

2. Select your application.

3. Click **Edit**, then click **Edit details**.

4. On the **Permissions** tab, click **Edit**.

5. Enable the **Request email addresses from users** option.

6. Click **Save**.

## Getting the API key and API secret

When you register your application, X generates an API key to identify the application.

### Steps

1. Go to the [X Developer site](http://developer.x.com).

2. Select your application.

3. On the **Keys and tokens** tab, copy the following values to a secure location:

   * **API key**: The consumer key that identifies the application.

   * **API secret key**: The consumer secret that secures the application.

## Adding X as an identity provider in PingOne

Configure the IdP connection in PingOne.

### Before you begin

Ensure that registration is enabled in the authentication policy. Learn more in [Editing an authentication policy](../authentication/p1_edit_auth_policy.html).

You should have the following information ready:

* API key

* API secret key

Learn more in [Adding an identity provider - X](p1_add_idp_x_prereqs.html).

### Steps

1. In the PingOne admin console, go to **Integrations > External IdPs** and click **[icon: plus, set=fa]**.

2. Click **X**.

3. Click **Next**.

4. On the **Add External Identity Provider** page, enter the following information:

   * **Name**: A unique identifier for the IdP.

   * **Description** (optional): A brief description of the IdP.

   * **Population**: A population that overrides the authentication policy's registration population and enables just-in-time registration from the IdP.

     |   |                                                                                                         |
     | - | ------------------------------------------------------------------------------------------------------- |
     |   | You can't change the **Icon** and **Sign-on Button** in accordance with the provider's brand standards. |

5. Click **Next**.

6. Configure the connection and enter the following information:

   * **API key**: The consumer key that you copied earlier from the IdP. You can find this information on the [X Developer site](http://developer.x.com).

   * **API secret key**: The consumer secret that you copied earlier from the IdP. You can find this information on the [X Developer site](http://developer.x.com).

   * **Callback URL**: Copy the **Callback URL** to a secure location. You'll provide this value to the IdP later.

7. Click **Next**.

8. Define how the PingOne user attributes are mapped to IdP attributes. Learn more in [Mapping attributes](../directory/p1_editsamlattributemapping.html).

   * Enter the PingOne user profile attribute and the external IdP attribute. Learn more about attribute syntax in [Identity provider attributes](p1_idp_attributes.html).

   * To add an attribute, click **[icon: plus, set=fa]Add**.

   * To use the advanced expression builder, click the **Gear** icon. Learn more in [Using the expression builder](../pingone_expression_language/p1_use_expression_builder.html).

   * Select the update condition, which determines how PingOne updates its user directory with the values from the IdP. The options are:

     * **Empty only**: Update the PingOne attribute only if the existing attribute is empty.

     * **Always**: Always update the PingOne directory attribute.

9. Click **Save**.

10. To enable the IdP, click the toggle at the top of the details panel to the right (blue).

    |   |                                                                    |
    | - | ------------------------------------------------------------------ |
    |   | You can disable the IdP by clicking the toggle to the left (gray). |

## Adding the callback URL to the X Developer site

Copy the callback URL from the PingOne admin console and paste it in the X Developer site.

### Steps

1. In the PingOne admin console, go to **Integrations > External IdPs** and browse or search for the appropriate IdP.

2. Click the IdP to open the details panel.

3. On the **Connection** tab, copy the **Callback URL** to a secure location.

4. On the [X Developer site](https://developer.x.com/), select your application.

5. On the **App details** tab, for **Callback URL**, paste the value that you copied earlier.

6. Click **Save**.

### Next steps

* [Add the IdP to your authentication policy](../authentication/p1_edit_auth_policy.html).

* [Apply the authentication policy to your application](../applications/p1_apply_auth_policy_to_applications.html).
