---
title: Using the PingDirectory server or the PingDirectoryProxy server with PingFederate OAuth tokens
description: Configure an access token validator to use PingFederate OAuth tokens with the SCIM 2.0 HTTP servlet on PingDirectory or PingDirectoryProxy.
component: pingdirectory
version: 11.1
page_id: pingdirectory:pingdirectory_server_administration_guide:pd_ds_use_pds_pdps_with_pf
canonical_url: https://docs.pingidentity.com/pingdirectory/11.1/pingdirectory_server_administration_guide/pd_ds_use_pds_pdps_with_pf.html
llms_txt: https://docs.pingidentity.com/pingdirectory/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: July 18, 2024
section_ids:
  before-you-begin: Before you begin
  about-this-task: About this task
  steps: Steps
---

# Using the PingDirectory server or the PingDirectoryProxy server with PingFederate OAuth tokens

Configure an access token validator to use PingFederate OAuth tokens with PingDirectory.

## Before you begin

You need the following information:

* The runtime engine service port of the PingFederate server, usually 9031

* The client ID of an OAuth 2.0 client configured on the PingFederate server

* The client secret of the OAuth 2.0 client

* The IP address of the PingFederate server

## About this task

After you configure a PingFederate server to issue OAuth 2 tokens, you must make these tokens compatible with SCIM 2.0 operations on the PingDirectory server or the PingDirectoryProxy server.

This section explains how to set up an access token validator to handle this task.

## Steps

1. Register the PingFederate server using the following command.

   ```
   dsconfig create-external-server \
     --server-name PingFederateInstance \
     --type http \
     --set base-url:https://<PingFed IP address>:<PingFed port>  \
     --set hostname-verification-method:allow-all \
     --set "trust-manager-provider:Blind Trust"
   ```

   |   |                                                                                                                                                                                                                 |
   | - | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | In this example, the host name verification method is set to `allow-all` and the Blind Trust manager provider is used for the sake of simplicity. You shouldn't use these settings for production environments. |

2. Create the access token validator using the following command.

   ```
   dsconfig create-access-token-validator \
                           --validator-name PingFederateValidator \
     --type ping-federate \
     --set enabled:true \
     --set authorization-server:PingFederateInstance \
     --set client-id:client-id  \
     --set client-secret:client-secret
   ```

   |   |                                                                                                                                                             |
   | - | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
   |   | Take the *client-id* and *client-secret* values from the PingFederate OAuth 2 client that will be used with the PingDirectory server or PingDirectoryProxy. |

3. Add the access token validator to the SCIM 2 HTTP Servlet configuration with the following command.

   ```
   dsconfig set-http-servlet-extension-prop \
     --extension-name SCIM2 \
     --set access-token-validator:PingFederateValidator
   ```

4. Test the validator by sending a GET request to `/scim/v2/ServiceProviderConfig`.

   This endpoint doesn't require any scopes to access, just a valid bearer token. The server should return a response similar to the following.

   ```json
   {
       "schemas": [
           "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"
       ],
       "patch": {
           "supported": true
       },
       "bulk": {
           "supported": false,
           "maxOperations": 0,
           "maxPayloadSize": 0
       },
       "filter": {
           "supported": true,
           "maxResults": 0
       },
       "changePassword": {
           "supported": true
       },
       "sort": {
           "supported": false
       },
       "etag": {
           "supported": false
       },
       "authenticationSchemes": [
           {
               "name": "OAuth 2.0 Bearer Token",
               "description": "The OAuth 2.0 Bearer Token Authentication scheme. OAuth enables clients to access protected resources by obtaining an access token, which is defined in RFC 6750 as \"a string representing an access authorization issued to the client\", rather than using the resource owner's credentials directly.",
               "specUri": "http://tools.ietf.org/html/rfc6750",
               "type": "oauthbearertoken",
               "primary": true
           }
       ],
       "meta": {
           "resourceType": "ServiceProviderConfig",
           "location": "https://localhost:8443/scim/v2/ServiceProviderConfig"
       }
   }
   ```
