Problem statement
We want to know how to get or export users from our tenant.
Solution
There are two options:
Option #1
- Obtain a list of all users related to a specific connection in your tenant
- Obtain a json/CSV export of users that runs asynchronously.
In the fields section, add the fields you want to export, such as the last login fields.
{"name": "last_login",},
{"name":"logins_count"}
- This will give you a job ID.
- Obtain the Job url by making a call to the Management API V2 Get Job by ID endpoint:
- Download the csv.gz or json.gz file, and uncompress it to get the user list with the attributes you have specified.
The below docs explain how to export users in the Management API.
- https://auth0.com/docs/users/bulk-user-exports
- https://auth0.com/docs/api/management/v2#!/Jobs/post_users_exports
Option #2
- Use the Import/Export users extensions from the dashboard, with which you could get similar results. This doc explains the details.
Below is a sample user export file with the list of users.