Hello! I’m trying to export my users, including a few fields that are inside app_metadata
and user_metadata
, but the downloaded CSV doesn’t include them.
When I look into my users → raw JSON to verify the info is there, I can clearly see the user_metadata.groups
being an array of strings.
This is an example, but I couldn’t make it work with any of the fields inside app_metadata
or user_metadata
.
Thanks!
Hi @antonio.acuna
Welcome to the Auth0 Community!
Thank you for posting your question. If you are exporting users in the CSV format you have to provide the full path to the object for the export:
{
//rest of user profile...
"app_metadata": {
"address": {
"street_address": {
"number": "1",
}
}
}
To get the number attribute value exported the field would need to be specified like below:
{
"connection_id": "<connection ID here",
"format": "csv",
"fields": [
{
"name": "user_id"
},
{
"name": "username"
},
{
"name": "app_metadata.address.street_address.number"
}
]
}
Alternatively, you can use the JSON object instead of the CSV to export the entire object or the list by just requesting the app_metadata/user_metadata.
You can read more about that here → Fields that can be Exported using the Bulk Export Tool
Thanks
Dawid
Hello @dawid.matuszczyk , I’m using the User Import / Export extension.
And yes, I’m using the full path. In my case is:
{
// raw JSON from user
"user_metadata": {
"groups": [
"group_1",
"group_2",
"group_3"
]
},
}
And in the Export tool, I use:
User Attribute → Field Name
email
→ Email
identities[0].connection
→ Connection
last_login
→ Last Login
user_metadata.groups
→ Groups
Thank you for the reply, @antonio.acuna. Can you try to export the users with the POST /API/v2/jobs/users-exports
? https://auth0.com/docs/manage-users/user-migration/bulk-user-exports. I want to identify if that’s an issue on the extension side or maybe a misconfiguration.
Thanks
Dawid