Not able to export the users profiles through Management API

When I try to run the API ‘Create job to export users’ It gives error. My requirement is to export the users through API. I tried using ‘list user’ API but it has limitation it lists only 100 users. Our database has 500 user then I tried Export all users to a file using a long running job using Create job to export users’ but I always get the error body invalid. Can you let me know the issue with below json file. As all the fields are optional I have used below json format.
{
“connection_id”: “”,
“format”: “json”,
“limit”: 500,
“fields”: [
[
{
“name”: “user_id”
}
]
]
}

Your snippet of code has the wrong type of double quotes. Unless it was due to copy pasting and auto formatting when sharing the snippet here, I suggest you make sure you’re using the " chars.

Additionally, I identified that there seems to be an error in the example snippet found in our Management API explorer. Here’s how your code should look like to make it work:

{
    "format": "json",
    "limit": 500,
    "fields": [
        {
            "name": "user_id"
        }
    ]
}

Notice that there’s no nested arrays in the fields attribute. Also, if you don’t want to specify any particular connection, you need to remove the connection attribute.

Thanks mauricio. Its worked. One more quick query. How do I export the users password using API.

Hey!

You can’t export password hashes using the Management API. In the case you need this data to migrate out of Auht0, you can request it by opening a support ticket. Please note that in order to make this request you must be signed in to the Developer plan for one month.

This is outlined here: Export Data

Hope this helps.

This FAQ explains the details about how to export user password hashes using the Management API, therefore link it with this topic.

1 Like