Auth0 Home Blog Docs

Management API Users Missing Data

management-api
tier1

#1

I am using the management API to export a .json file of all of the users in our Auth0 account and I’ve noticed I’m missing app metadata for some of them. When I went through the list of users missing this data in the dashboard, the data was actually in the account. I’m not sure if I’m doing something wrong, or if the API is just being weird.

The code I’m using is here: https://gist.github.com/xylude/1c38fcd8d08ede96975af5ef7155b233

If anyone can take a look and let me know if there’s something I’m missing I’d appreciate it, thanks!


#2

We’re having this issue as well. The dashboard shows one set of data but the API shows different data. Even after several days the API request response never matches up with what’s listed in the dashboard. This seems to happen randomly and not with every user.
I have open support tickets with Auth0 but I haven’t received an answer yet.


#3

Yeah, it seems like they are 2 different collections of data that are out of sync with each other. My ‘fix’ was to run the get all users API call first, then make a second pass where I check if the user has their app_metadata. If not, the script would run an additional call to the get user API and try to retrieve the user’s document and add it to the list. Then I manually went through the users that were still missing data after that and confirmed that they were actually missing the data. It was a real fun time for me.


#4

If it helps (and you are using the node API) I can post up a gist of the code I used to do all of this.


#5