Migrate From Ping Identity
On this page
This guide moves your users and their profile data from Ping Identity to FusionAuth. Ping Identity doesn't export password hashes. To keep each user's password, run a slow migration, which moves each user at the user's first login. When password resets are acceptable, run a bulk migration, which moves every user at once.
Prerequisites#
- Install FusionAuth. For more information, see Install FusionAuth.
- For a slow migration, get a license for the Starter plan or higher. Slow migrations use Connectors, a paid feature.
- Install Python 3 for the sample authentication API and export script.
- Install Ruby for the import script.
Planning Considerations#
Plan the migration before you move any users. For the general planning steps, see Plan a Migration. The following sections cover what differs for Ping Identity.
Slow Migration Or Bulk Migration#
A slow migration keeps each user's password. Users log in to FusionAuth with their Ping Identity credentials, and FusionAuth moves each user through a Connector.
When password resets are acceptable, a bulk migration moves every user at once. You can also run a bulk migration after a slow migration has run for a while. The bulk migration then moves the users who haven't logged in.
For more information, see Migration Types.
Mapping User Attributes#
Map each Ping Identity user attribute to a field of the FusionAuth User. Ping Identity configures custom attributes at the directory level. Store custom attributes and other attributes without a FusionAuth field in user.data, which accepts any valid JSON value. For more information, see Map User Data.
One Tenant Or Many#
The Ping Identity platform uses an organization-based model. The organization is the top-level object and represents your whole enterprise.
A FusionAuth TenantA logical container for Users, Applications, and settings that is isolated from other Tenants. also holds users, applications, and other configuration. Each Tenant is a separate user space. You can merge several Ping Identity organizations into one FusionAuth Tenant, or create a Tenant for each organization. For more information, see Multi-tenancy.
Identity Providers#
Ping Identity authenticates users with the PingOne user directory or with an external identity provider. An external identity provider maps PingOne user attributes to the provider's attributes. FusionAuth calls these providers Identity Providers.
When Ping Identity users log in with social login providers, such as Google, Facebook, or Twitter, confirm that FusionAuth supports each provider. For the supported providers, see Identity Providers.
When FusionAuth doesn't support a provider directly, the provider may work through an OIDC or SAML connection. Otherwise, open a feature request.
To migrate social logins, you may need to change the options of the Ping Identity import script. For more information, see Use the Script.Users who log in through an external identity provider authenticate with that provider. Import these users with the Import Users API instead of a slow migration. To export the users, see Export Users From Ping Identity. To link the imported users to FusionAuth Identity Providers, see Users With Social Logins.
Other Entities#
Migrate configuration other than users, such as applications and password policies, by hand or with a script. The following Ping Identity concepts map to FusionAuth features:
- Ping Identity applications, such as the OIDC application in this guide, map to FusionAuth Applications. Ping Identity gives the users of an environment's directory access to the environment's applications by default, subject to roles. FusionAuth connects each user to an Application with a Registration.
- DaVinci orchestrates flows, which guide users through journeys such as registration and authentication. FusionAuth customizes these journeys with Lambdas and webhooks. Some webhook configurations can stop an authentication flow.
- A Ping Identity role collects permissions for a user, application, or connection. FusionAuth configures roles for each Application, and puts a user's roles in the token after login.
- Ping Identity groups organize users to manage access to applications. FusionAuth also has Groups.
- A Ping Identity population defines a set of users. In FusionAuth, a Tenant manages a set of users.
- Ping Identity sends emails, such as forgot password notifications. FusionAuth also sends emails from customizable templates.
- Ping Identity supports the Client Credentials grantAn OAuth 2.0 grant type in which a client uses its own credentials to obtain an access token for itself.. FusionAuth offers a constrained version of the grant with Entity Management, which requires the Starter plan or higher.
- Ping Identity supports multi-factor authentication (MFA). FusionAuth also supports MFA. You can enable MFA for a Tenant and configure MFA for a user at any time.
Ping Identity pricing can limit the number of users. FusionAuth has no user limit. The resources of the FusionAuth instance, such as memory, CPU, and database capacity, set the limit instead.
Login UI#
Ping Identity supports custom branding and themes. Login pages vary widely across Ping Identity instances, so this guide doesn't cover login page migration. In FusionAuth, you can theme the hosted login pages or build your own login pages. For more information, see Login Options.
Slow Migration#
Test the slow migration in a test environment before you deploy the configuration to production. The slow migration has the following steps:
- Set up FusionAuth.
- Set up Ping Identity.
- Set up the authentication API.
- Set up the Connector.
- Log in as a test user.
- Move to production.
Set Up FusionAuth#
Create a test Tenant and a test Application for the migration.
Create a Test Tenant#
It is best to create a separate tenant for migration testing. Tenants logically isolate configuration settings and users. If a migration goes awry or you need to redo it after tweaking settings, you can delete the test tenant and start with a clean system. To add a tenant, navigate to Tenants and click the Add button.

Give it a descriptive Name like Ping Identity import test. You shouldn't need to modify any of the other configuration options to test importing users.
Save the tenant.

Record the Id of the tenant, which will be a UUID. It will look something like 25c9d123-8a79-4edd-9f76-8dd9c806b0f3. You'll use this later.

Create a Test Application#
Applications are anything a user can log in to. In FusionAuth there's no differentiation between web applications, SaaS applications, APIs and native apps. To add an application, navigate to Applications and click on the Add button. Give the application a descriptive name like Ping Identity application.
Select your new tenant, created above, in the dropdown for the Tenant field.
Navigate to the OAuth tab and add an entry to Authorized redirect URLs. Use a dummy value such as https://example.com. Later, you'll need to update this to be a valid redirect URL that can take the authorization code and exchange it for a token. Learn more about this in the FusionAuth OAuth documentation.
You shouldn't need to modify any of the other configuration options to test importing users. Save the application.

Next, view the application by clicking the Select dropdown and choosing View , then note the OAuth IdP login URL. You'll be using it to test that users can log in.

Set Up Ping Identity#
FusionAuth sends each login to an API that you host. The API checks the credentials with Ping Identity and returns the user's profile from the PingOne API.
You can host the API on any service that FusionAuth can reach. Options include an Azure Functions HTTP trigger, an AWS Lambda function behind AWS API Gateway, and a local server that ngrok makes public. This guide runs a Flask app locally and exposes the app with ngrok.
The API needs a worker application and an OIDC application in your Ping Identity environment. The worker application reads user profiles from the PingOne API. The OIDC application checks user credentials. To set up Ping Identity:
-
Add the PingOne Authorize service to your environment. Navigate to Overview -> Services , click + , and click + Add next to the PingOne Authorize service.

-
Create a worker application. Navigate to Applications -> Applications and click + . Set Application Name, select the
Workerapplication type, and save the application.
-
Enable the worker application with the toggle next to the application name, at the top right.
-
Assign the worker application roles that can read your user data, such as the
Identity Data Adminrole for your environment.
-
On the Configuration tab of the worker application, click Get Access Token . Record the access token.

-
On the Overview tab of the worker application, record the Environment ID.
-
Create an OIDC application. Navigate to Applications -> Applications and click + . Set Application Name, select the
OIDC Web Appapplication type, and save the application. -
Enable the OIDC application with the toggle next to the application name, at the top right.
-
On the Configuration tab of the OIDC application, click the pencil icon and set the following values:
- Set Response Type to
Code. - Set Grant Type to
Authorization Code. - Set Redirect URIs to
https://www.google.com.

- Set Response Type to
-
Save the configuration, and record the Client Id of the OIDC application.
FusionAuth sends plaintext user credentials to the API. Secure the data in transit and every endpoint of the API. In this guide, all traffic uses TLS.
The PingOne access token needs administrative permissions. The access token also expires, so renew the access token when the API stops working.
Set Up the Authentication API#
The sample API is a Flask app. To run the API:
-
Create a directory for the app, and open the directory.
$ mkdir authenticator_app && cd authenticator_app -
Create and activate a virtual environment.
$ python -m venv venv $ source venv/bin/activate -
Install the dependencies.
$ pip install requests flask -
Create a
pingIdentityAuth.pyfile with the following code:# python -m venv venv # source venv/bin/activate # pip install requests flask import requests import json from flask import Flask, render_template, jsonify, request app = Flask(__name__) authPath = 'https://auth.pingone.com' # change domain to the one for the region where your user data is stored apiPath ='https://api.pingone.com/v1' # change domain to the one for the region where your user data is stored envID = 'YOUR ENVIRONMENT ID' appId = 'YOUR PING IDENTITY OIDC APP CLIENT ID' accessToken = "YOUR ACCESS TOKEN" def sentAuthRequest(appId): url = f"{authPath}/{envID}/as/authorize?response_type=code&client_id={appId}&redirect_uri=https://www.google.com&scope=openid" payload = {} headers= {} response = requests.request("GET", url, headers=headers, data = payload, allow_redirects=False) if response.status_code!=302: print(response.status_code) print(response.text.encode('utf8')) else: return response.headers['Location'].split("flowId=")[1] def getFlowId(flowId): url = f"{authPath}/{envID}/flows/{flowId}" payload = {} headers = {} response = requests.request("GET", url, headers=headers, data = payload) if response.status_code!=200: print(response.status_code) print(response.text.encode('utf8')) return None else: return flowId def submitCredentials(flowID,username,userPassword): url = f"{authPath}/{envID}/flows/{flowID}" payload = "{\n \"username\": \""+ username +"\",\n \"password\": \""+ userPassword+"\"\n}" headers = { 'Content-Type': 'application/vnd.pingidentity.usernamePassword.check+json' } response = requests.request("POST", url, headers=headers, data = payload) if response.status_code!=200: print(response.status_code) print(response.text.encode('utf8')) else: result = transform_json_user(response.content) return result def transform_json_user(input_json): dataJson = json.loads(input_json) userId = dataJson["_embedded"]['user']['id'] dataJson = readUserInfo(userId) transformed_user = { "active": dataJson.get("enabled", False), "birthDate": None, "data": { "migrated": True, }, "email": dataJson.get("email", ""), "expiry": None, "firstName": dataJson["name"].get("given", ""), "fullName": "", # user["name"]["formatted"], "id": dataJson.get("id", ""), "lastLoginInstant": 0, "lastName": dataJson["name"].get("family", ""), "middleName": "", "passwordChangeRequired": False, "passwordLastUpdateInstant": 0, "preferredLanguages": ["en"], "timezone": None, "username": dataJson.get("username", ""), "verified": dataJson.get("verifyStatus", False)==True, } result_json = {"user": transformed_user} return result_json def readUserInfo(userId): url =f'{apiPath}/environments/{envID}/users/{userId}?expand=population' headers = {'Authorization': 'Bearer ' +accessToken } response = requests.get(url,headers=headers,timeout=30) if response.status_code!=200: print(response.status_code) print(response.text.encode('utf8')) else: jsonData = response.json() return jsonData @app.route('/api/RopcProxy', methods=['POST']) def rocp_proxy(): # Extract the 'code' query parameter from the URL code = request.args.get('code') if not code: return jsonify({'error': 'Missing code parameter'}), 400 # Extract the 'loginId' and 'password' from the JSON body data = request.get_json() if not data or 'loginId' not in data or 'password' not in data: return jsonify({'error': 'Invalid or missing JSON body'}), 400 login_id = data['loginId'] password = data['password'] response_data = TestCredentialLogin(appId,login_id,password) # print(json.dumps(response_data,indent=3)) return response_data def TestCredentialLogin(appId,username,password): print("--> Send auth request") flowId =sentAuthRequest(appId) print(flowId) print("--> Get Flow") flowId2=getFlowId(flowId) print(flowId2) print("--> Validating Credentials") result = submitCredentials(flowId2,username,password) print("--> Done") return result if __name__ == '__main__': app.run(host='0.0.0.0', port=5001,debug=True) -
Set the following values in
pingIdentityAuth.py:envID: the Id of the environment that holds the users.appId: the Client Id of the OIDC application.accessToken: the access token of the worker application.authPathandapiPath: the domains for the region that hosts your Ping Identity data.
-
Change the
transform_json_userfunction to match the user attributes you want to import. The exact changes depend on your custom attributes and business logic. For example, the function can assign FusionAuth roles, register users for more than one Application, or add users to an existing FusionAuth Group. -
Start the app.
$ python pingIdentityAuth.py -
Install ngrok with the ngrok quickstart. The free ngrok plan works for this guide.
-
In a second terminal, start ngrok on the app's port. Record the forwarding URL that ngrok prints, such as
https://random-ngrok-string.ngrok-free.app.$ ngrok http 5001
The app receives a login request from FusionAuth and checks the credentials with the PingOne flows API. On success, the app reads the user from the PingOne API users endpoint. The transform_json_user function then converts the user to a FusionAuth User.
The app rejects requests without a code query parameter, but accepts any value. To use the code as a shared secret, add a check for your value to the app.
Test the API#
Test the API with the credentials of a Ping Identity test user. The Connector uses the same URL, including the code query parameter:
$ curl -X POST 'https://random-ngrok-string.ngrok-free.app/api/RopcProxy?code=s0ndU863xdbXsFO4dLZAJQXLzyTU789iaUJ43uLAtIkXm_AzFuFWP1zg==' \
-H 'Content-type: application/json' \
-d '{
"loginId": "Richard",
"password": "password"
}'
After a successful login, the app reads a user like the following from the PingOne API:
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529"
},
"environment": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0"
},
"population": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/populations/fbfccbc2-f853-4539-a2f1-c4210d155c51"
},
"devices": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/devices"
},
"roleAssignments": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/roleAssignments"
},
"password": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/password"
},
"password.reset": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/password"
},
"password.set": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/password"
},
"password.check": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/password"
},
"password.recover": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/password"
},
"linkedAccounts": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/linkedAccounts"
},
"account.sendVerificationCode": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529"
},
"memberOfGroups": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/users/cffa5359-aa0a-4d4c-8a1c-4cc18a36a529/memberOfGroups"
}
},
"_embedded": {
"population": {
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0/populations/fbfccbc2-f853-4539-a2f1-c4210d155c51"
},
"environment": {
"href": "https://api.pingone.com/v1/environments/de6b5f05-a95b-4ada-85bb-d8892700d1a0"
}
},
"id": "fbfccbc2-f853-4539-a2f1-c4210d155c51"
}
},
"id": "cffa5359-aa0a-4d4c-8a1c-4cc18a36a529",
"environment": {
"id": "de6b5f05-a95b-4ada-85bb-d8892700d1a0"
},
"account": {
"canAuthenticate": true,
"status": "OK"
},
"createdAt": "2024-02-18T07:00:18.420Z",
"email": "richard.hendricks@piedpiper.com",
"enabled": true,
"identityProvider": {
"type": "PING_ONE"
},
"lastSignOn": {
"at": "2024-02-18T19:17:47.061Z",
"remoteIp": "105.214.52.47"
},
"lifecycle": {
"status": "ACCOUNT_OK"
},
"mfaEnabled": false,
"name": {
"given": "Richard",
"family": "Hendricks"
},
"population": {
"id": "fbfccbc2-f853-4539-a2f1-c4210d155c51"
},
"updatedAt": "2024-02-18T19:17:47.086Z",
"username": "Richard",
"verifyStatus": "NOT_INITIATED"
}
The app returns the user in the FusionAuth format:
{
"user": {
"active": true,
"birthDate": null,
"data": {
"migrated": true
},
"email": "richard.hendricks@piedpiper.com",
"expiry": null,
"firstName": "Richard",
"fullName": "",
"id": "cffa5359-aa0a-4d4c-8a1c-4cc18a36a529",
"lastLoginInstant": 0,
"lastName": "Hendricks",
"middleName": "",
"passwordChangeRequired": false,
"passwordLastUpdateInstant": 0,
"preferredLanguages": [
"en"
],
"timezone": null,
"username": "Richard",
"verified": false
}
}
When the request has no code query parameter or no JSON body, the app returns a 400 status code. When the login fails, the sample app returns an error instead of the 404 status code that a Generic Connector expects. Change the error handling before you use the app in production. To see the status code, run curl with the -v option.
When you migrate with an AWS Lambda function or an Azure Function instead, deploy the function before you configure the Connector.
Set Up the Connector#
This feature requires at least a Starter plan.
A Generic Connector sends each login to the API. Connectors require a valid ReactorThe FusionAuth system that manages licenses and paid features. license. For more information, see Licensing.
To set up the Connector:
-
In the Admin UI, navigate to Settings -> Connectors . Open the add menu at the top right and select Add Generic connector .

-
Configure the Connector:
- Set Name to a value such as
PingIdentityConnector. - Set Authentication URL to the API URL, such as
https://random-ngrok-string.ngrok-free.app/api/RopcProxy?code=s0ndU863xdbXsFO4dLZAJQXLzyTU789iaUJ43uLAtIkXm_AzFuFWP1zg==. - Leave the headers empty. The API reads the code from the query string.
- Raise Connect timeout and Read timeout to allow for network latency.

- Set Name to a value such as
-
Save the Connector.
-
Navigate to Tenants , edit the test Tenant, and open the Connectors tab.
-
Click Add policy .

-
Set Connector to the Connector you created, and turn on Migrate user. Keep Domains set to
*, which applies the Connector to every user. Submit the policy. -
Move the new policy to the top of the list with the arrow buttons.

-
Save the Tenant.
FusionAuth now checks each user against the Connector the first time FusionAuth sees the user. When the login succeeds, FusionAuth moves the user into the FusionAuth database.
Log In as a Test User#
To confirm that users move into FusionAuth:
-
Copy the OAuth IdP login URL that you recorded in Create a Test Application.
-
Open the URL in a private browser window. A private window keeps your Admin UI session out of the test.

-
Log in with the credentials of a Ping Identity user, such as the user from the curl test.
-
In the Admin UI, navigate to Users and confirm that the user exists.

After the login, FusionAuth redirects to a URL such as https://example.com/?code=2aUqU0ZhQCjtz0fnrFL_i7wxhIAh7cTfxAXEIpJE-5w&locale=en&userState=AuthenticatedNotRegistered. No web application handles the authorization code redirect yet. To build one, follow a quickstart.
When the login fails or the user doesn't move, turn on Enable debug logging in the Connector at Settings -> Connectors . Log in again, and look for errors in System -> Event Log .
After a user moves, FusionAuth handles every profile and password change for the user.
Move to Production#
After testing, apply the same configuration to production. Migrate users into the default tenantThe Tenant that FusionAuth creates during installation. You can't delete the Default Tenant, which hosts the FusionAuth Admin UI Application. or a new Tenant, and add the Connector policy to that Tenant.
When you don't keep users in the test Tenant, delete the test Tenant. Deleting a Tenant also deletes the Tenant's users and configuration, so you can start over after you change a setting. To delete a Tenant, navigate to Tenants , click Select in the Tenant's row, and choose Delete . Deleting a Tenant with many users takes time. To remove only a few users, delete the users one at a time in the Admin UI instead.

End the Slow Migration#
To estimate how long the slow migration takes, see Migration Timeline. At the end of the migration period, bulk migrate the remaining users, or treat the remaining users as inactive. Then remove the Connector policy from the Tenant. For more information, see End the Migration.
Bulk Migration#
A bulk migration doesn't export password hashes from Ping Identity. After the import, every user must reset a password in FusionAuth.
Export Users From Ping Identity#
The sample export script reads users from the PingOne Users API. The script writes the users as JSON for the FusionAuth Import Users API. To export users:
-
Create a worker application and record the access token and the environment Id. Follow Set Up Ping Identity through the Environment ID step.
-
Create and activate a Python virtual environment, as in Set Up the Authentication API. Then install the dependencies.
$ pip install requests -
Create an
exportPingUsers.pyfile with the following code:# python -m venv venv # source venv/bin/activate # pip install requests import requests from requests.auth import HTTPDigestAuth import json apiPath = 'https://api.pingone.com/v1' # change domain to the one for the region where your user data is stored method_call = 'users' envID = 'ADD YOUR ENVIRONMENT ID' access_token = "ADD YOUR ACCESS TOKEN" base_url = f'{apiPath}/environments/{envID}/' # This method can be enhanced to add more or less data from the main export i.e. Custom Attributes def transform_json(input_json): transformed_users = [] for user in input_json["_embedded"]["users"]: transformed_user = { "active": user["enabled"], "birthDate": None, "insertInstance": None, # Replace with appropriate value "data": { "migrated": True, # Replace with appropriate value "favoriteColors": None, # Replace with appropriate value }, "email": user["email"], "expiry": None, "firstName":'',# ["name"]["family"], "fullName": '',#user["name"]["formatted"], "id": user["id"], "lastLoginInstant": 0, "lastName": user["name"]["family"], "middleName": "", "mobilePhone": "", "password": None, # Replace with appropriate value "salt": None, # Replace with appropriate value "factor": 10000, "encryptionScheme": "salted-pbkdf2-hmac-sha256", "passwordChangeRequired": False, "passwordLastUpdateInstant": 0, "preferredLanguages": ["en"], "identityProviders": {}, "timezone": None, "twoFactorEnabled": False, "username": user["username"], "verified": True, # Replace with appropriate value } transformed_users.append(transformed_user) result_json = {"users": transformed_users} return result_json def main(): url = base_url + method_call headers = { 'Authorization': 'Bearer ' +access_token, } response = requests.get( url, headers=headers, timeout=30 ) print(response.status_code) result = response.json() with open("org.json", "w") as json_file: json.dump(result, json_file, indent=2) output = transform_json(result) with open("users.json", "w") as json_file: json.dump(output, json_file, indent=2) if __name__ == "__main__": print("Exporting data....") main() print("Exporting done.") -
Set
envIDto the environment Id andaccess_tokento the access token. SetapiPathto the domain for the region that hosts your Ping Identity data. -
Change the
transform_jsonfunction to map any other attributes you need, such as custom attributes. -
Run the script.
$ python exportPingUsers.py
The sample script sends one request to the PingOne Users API, and doesn't follow pagination links. When the response doesn't hold every user, add pagination to the script.
The script saves the PingOne response to org.json. The response looks like the following:
{
"_links": {
"self": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users?limit=100"
}
},
"_embedded": {
"users": [
{
"_links": {
"password": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/password"
},
"password.set": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/password"
},
"account.sendVerificationCode": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c"
},
"linkedAccounts": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/linkedAccounts"
},
"self": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c"
},
"password.check": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/password"
},
"password.reset": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/password"
},
"password.recover": {
"href": "https://api.pingone.com/v1/environments/24f17b5b-a458-4238-973e-0f77401897ed/users/916b9057-1de6-4718-931d-91f9e886316c/password"
}
},
"id": "916b9057-1de6-4718-931d-91f9e886316c",
"environment": {
"id": "24f17b5b-a458-4238-973e-0f77401897ed"
},
"account": {
"canAuthenticate": true,
"status": "OK"
},
"address": {
"streetAddress": "115 Randy Park",
"locality": "Cookshire-Eaton",
"countryCode": "CA"
},
"createdAt": "2024-02-14T16:28:27.845Z",
"email": "hearthfield_berengere@example.com",
"enabled": true,
"identityProvider": {
"type": "PING_ONE"
},
"lifecycle": {
"status": "ACCOUNT_OK"
},
"mfaEnabled": false,
"name": {
"formatted": "Hearthfield Bérengère",
"given": "Hearthfield",
"family": "Bérengère"
},
"population": {
"id": "5a899957-18d8-4a62-9a15-e7d4a5265bf8"
},
"updatedAt": "2024-02-14T16:28:27.845Z",
"username": "hearthfield_bérengère",
"verifyStatus": "NOT_INITIATED"
}
]
}
}
The script converts the users and saves the result to users.json, in the same directory as the script:
{
"users": [
{
"active": true,
"birthDate": null,
"insertInstance": null,
"data": {
"migrated": true,
"favoriteColors": null
},
"email": "hearthfield_berengere@example.com",
"expiry": null,
"firstName": "",
"fullName": "",
"id": "916b9057-1de6-4718-931d-91f9e886316c",
"lastLoginInstant": 0,
"lastName": "",
"middleName": "",
"mobilePhone": "",
"password": null,
"salt": null,
"factor": 10000,
"encryptionScheme": "salted-pbkdf2-hmac-sha256",
"passwordChangeRequired": false,
"passwordLastUpdateInstant": 0,
"preferredLanguages": [
"en"
],
"identityProviders": {},
"timezone": null,
"twoFactorEnabled": false,
"username": "hearthfield_bérengère",
"verified": true
},
{
"active": true,
"birthDate": null,
"insertInstance": null,
"data": {
"migrated": true,
"favoriteColors": null
},
"email": "wingar_helena@example.com",
"expiry": null,
"firstName": "",
"fullName": "",
"id": "a7ff34b6-dfa1-4d60-abd7-5614eb21c8dc",
"lastLoginInstant": 0,
"lastName": "",
"middleName": "",
"mobilePhone": "",
"password": null,
"salt": null,
"factor": 10000,
"passwordChangeRequired": false,
"passwordLastUpdateInstant": 0,
"preferredLanguages": [
"en"
],
"identityProviders": {},
"timezone": null,
"twoFactorEnabled": false,
"username": "wingar_hélèna",
"verified": true
}
]
}
Check the output for errors, and confirm that the data looks correct. To troubleshoot, change the script to print more information about each user.
Import Users#
Import the users into the test Tenant from Create a Test Tenant. When you skipped the slow migration, create the test Tenant and the test Application first.
Add an API Key#
The next step is to create an API key. This will be used by the import script. To do so, navigate to Settings -> API Keys in the Admin UI.

This key needs to have the permission to run a bulk import of users. In the spirit of the principle of least privilege, give it only the following permissions:
POSTto the/api/user/importendpoint.POSTto the/api/user/searchendpoint.POSTto the/api/identity-provider/linkendpoint (not shown below).
Record the API key string, as you'll use it below.

To run the script in Reset Passwords, also give the key the POST method on the /api/user/forgot-password endpoint.
Get the Script#
FusionAuth provides an import script under a permissive open-source license. It requires Ruby 3.0 or later. To get the script, clone the Git repository:
git clone https://github.com/FusionAuth/fusionauth-import-scripts
Navigate to the pingidentity directory:
cd fusionauth-import-scripts/pingidentity
The script needs the date, json, optparse, securerandom, and fusionauth_client gems. Your Ruby installation likely includes every gem except fusionauth_client. When you have Bundler, run bundle install in the pingidentity directory.
Use the Script#
To see the script's options, run the script with -h:
$ ruby ./import.rb -h
The script prints the following help:
Usage: import.rb [options]
-l, --link-social-accounts Link social accounts, if present, after import. This operation is slower than an import.
-r APPLICATION_IDS, A comma separated list of existing applications Ids. All users will be registered for these applications.
--register-users
-o, --only-link-social-accounts Link social accounts with no import.
-u, --users-file USERS_FILE The exported JSON user data file from IdentityServer. Defaults to users.json.
-f FUSIONAUTH_URL, The location of the FusionAuth instance. Defaults to http://localhost:9011.
--fusionauth-url
-k, --fusionauth-api-key API_KEY The FusionAuth API key.
-t TENANT_ID, The FusionAuth tenant id. Required if more than one tenant exists.
--fusionauth-tenant-id
-h, --help Prints this help.
Set the following options, unless the defaults work for you:
-u: the path of theusers.jsonfile.-f: the URL of your FusionAuth instance, such ashttp://localhost:9011for a local test.-k: the API key.-t: the Id of the test Tenant.
The -l and -o options link users to social Identity Providers, such as Google, that appear in the user file. Create the Identity Providers in FusionAuth first, or the links fail. Linking runs slower than the import. To save time, import the users without -l, and then run the script again with -o to create only the links. Social account linkingConnecting a user's account at an external Identity Provider to a FusionAuth User, so both accounts log in as the same User. The Identity Provider's linking strategy decides how FusionAuth matches the accounts. requires FusionAuth 1.28.0 or later and version 1.28.0 or later of the fusionauth_client gem.
Run the import:
$ ruby ./import.rb -f http://localhost:9011 -k '...' -t '...' -u users.json
The script prints output similar to the following:
FusionAuth Importer : IdentityServer
> User file: users.json
>> 2 users found in JSON file
> Call FusionAuth to import users
> Import success
Duplicate users 0
Import complete. 2 users imported.
The script's map_user method sets the following User fields: id, active, email, verified, insertInstant, and expiry. The -r option adds Registrations. Imported users keep their Ping Identity user Id.
The map_user method doesn't set username. When users log in with a username, add username to map_user. To import other attributes, roles, or Group memberships, change map_user to build the matching JSON. For more information, see the Import Users API.
Verify the Import#
In the Admin UI, navigate to Users and review the imported users.
Before the final import, set -t to the Id of the production Tenant. To start over, delete the test Tenant as described in Move to Production.
Reset Passwords#
The import script gives each user a random password, so every user must reset the password. Users can use the forgot password link on the login page. You can also send every user a reset email with the Forgot Password API.
The script below sends an email to every imported user. Confirm that your SMTP server can handle the volume. Configure the SMTP server in Tenants -> Your Tenant -> Email .
To send the emails:
-
Review the Forgot Password email template. For more information, see Forgot Password.
-
Put the
loginIdof every user in one file, one per line. TheloginIdis the username or the email address from the Ping Identity export. -
Set
API_KEY,LOGIN_ID_FILE, andFA_HOSTin the following script. Use the API key from Add an API Key.Example User Password Reset #!/bin/bash API_KEY=... LOGIN_ID_FILE=... FA_HOST=... for loginId in `cat $LOGIN_ID_FILE`; do sleep $[( $RANDOM % 10 > 8)] # sleeps 1 second ~10% of the time RES=`curl --max-time 600 \ -s -w "%{http_code}" \ -H "Authorization: $API_KEY" \ -H "Content-type: application/json" \ -XPOST \ $FA_HOST/api/user/forgot-password \ -d '{"loginId": "'$loginId'","sendForgotPasswordEmail": true}'` if [ "$RES" -ne "200" ]; then echo "Error: $RES"; exit 1; fi done -
Run the script. The script calls the Forgot Password API for each user, and sleeps now and then to avoid overloading the SMTP server.
Migrate Everything Else#
After the users move, migrate the other configuration described in Other Entities. The steps vary by configuration, but follow this pattern:
- Find the matching FusionAuth feature.
- Configure the feature in FusionAuth, either in the Admin UI or with a script that uses the client libraries or the APIs.
- Update your application configuration to use the FusionAuth feature.
Register your users with the right FusionAuth Applications in one of the following ways:
- Add Registrations to the users during the import.
- Create Registrations after the import with the Registrations API.
Change and test each application, whether custom, open source, or commercial, and confirm the following:
- Users can log in.
- The application handles the authorization code redirect.
- Users get the right permissions and roles from the JWT.
- The hosted login pages match the look and feel of the application.
When an application talks to Ping Identity through a standard OAuth, SAML, or OIDC library, the switch to FusionAuth usually takes few changes.
Additional Support#
If you need support in your migration beyond that provided in this guide, you may:
- Post in our forums and get support from the community.
- Purchase a support plan and get expert help from the Engineering Team.
Related
How to migrate your users from Akamai to FusionAuth.
Learn how to migrate your users to FusionAuth from Auth0.
Learn how to migrate your users to FusionAuth from Amazon Cognito.
Learn how to migrate your users to FusionAuth from Duende IdentityServer.