User Exporting

This guide will cover how to export users from Descope.

Descope Console

You can export users using the Descope console. Head over to the users page, select the required users for export, and the "Export CSV" button will appear:

export users csv ui

By pressing the button, you should be prompted with the download of the file.

CAUTION

This method of export is not meant to transfer users between different projects.

Accessing User Data

You can export user data securely by utilizing the Search Users endpoint of the Descope Backend API. This endpoint allows for the programmatic extraction of user information.

Alternatively, the searchAll() function available in the Descope Backend SDKs can be employed to retrieve a comprehensive list of users.

Submitting an empty request payload will return all users. Here's an example curl command to do so:

curl -i -X POST \
  https://api.descope.com/v1/mgmt/user/search \
  -H 'Authorization: Bearer <ProjectId>:<ManagementKey>' \
  -H 'Content-Type: application/json' \
  -d '{}'

Example Output

The output of the above curl command will be a JSON object containing user details. Below is an example of what the response might look like:

{
  "users": [
    {
      "loginIds": ["brian"],
      "userId": "U2iOCFIwsdgeGvusdfkKUb9HJKsdi",
      "name": "Brian",
      "email": "",
      "phone": "",
      "verifiedEmail": false,
      "verifiedPhone": false,
      "roleNames": [],
      "userTenants": [],
      "status": "enabled",
      "externalIds": ["brian"],
      "picture": "",
      "test": false,
      "customAttributes": {},
      "createdTime": 1719352134,
      "TOTP": false,
      "SAML": false,
      "OAuth": {},
      "webauthn": false,
      "password": false,
      "ssoAppIds": [],
      "givenName": "",
      "middleName": "",
      "familyName": ""
    },
    ...
  ],
  "total": 2152023
}

Migrating Users to a New System

While direct access to users' hashed passwords is not provided through our Backend APIs, you can contact our Support team for assistance. We can generate a .csv file containing your users' data and facilitate a secure data transfer.

Was this helpful?

On this page