Auth0 Home Blog Docs

Intermittent failures during export

Hi !
I have bumped into intermittent failures during the export using the extension.

Context:
I am not a Auth0 pro nor know a lot about it. But I need to get some user data out of it for a report.
I was tasked with automating the steps. Hope to eventually be able to use bulk export for that.
We have around 75k users’ data in Auth0.
What I am looking to extract is MFA enrolled users, but not just enrolled, but actually ones having used MFA.
As far as I know the sign of a user using MFA is user.multifactor field being non empty.
It can have several values, and in our case it’s guardian.
The issue using this field for filtering is that it’s not searchable.
So to find users having user.multifactor field having “guardian” value is to export all the users using the Import/Export extension into a json file, and then parse the data to filter out the MFA Enrolled users.

The issue with this approach is that when I test-export a small set of users, based on some filter, everything works fine and as expected.
But when I am trying to export all 75k users I get the error which I wasn’t able to find neither here in community nor by googling:
“Oh snap! You got an error!
Mapping failed: Cannot read property ‘customerId’ of undefined. Please review your user attributes for possible errors.”

Now one more thing as to how I do export. user_id values don’t help us much for our reporting purposes. So I need to map user_id to a customerId sub-field of the user_metadata object.
The user_metadata object looks like this:
“user_metadata”: {
“customerId”: “0002101607”,
<snipped_fields>
“mfaStatus”: “ENROLLED”,
“token”: “<token_value>”,
“key”: “<key_value”,
“entitlementScopes”: “<misc_scopes>”
},

So what I am trying to do is on the export screen I am assigning user.user_metadata.customerId to BP_ID and the hit the export button.
The exports goes for around 10 minutes, then shows me the Download button and after I hit the button to download the file it surprises me with the above error.
Could you please guide me where to look to solve the issue or to work around it?
How do I find whether there is some inconsistency with the metadata which doesn’t let export to process some records?

Thanks,
Alex