We have multiple tenants in our Auth0 “umbrella” account, and recently started allocating the costs for each tenant to the associated business unit. We first did this manually by downloading the spreadsheet under User Avatar > Account Usage, but needed a way to do it automatically.
This information isn’t available via the Management API without having to retrieve log data and manually parse through it (which takes forever), so we started digging and found the Support API (https://support-api.auth0.com/api/reports/).
Using the Support API turned out to be quite the task though, as there is no documentation about how to talk to it. That’s why I’m making this post, just in case someone else out there needs to get this info easily as well.
Ultimately, we were able to get successful responses from the API using the
password realm grant.
To do this, you’ll need some info:
- Username of user with access to view Account Summary Info (we used a service account we created)
- That user’s password
After that, you’ll want to hit this endpoint to get an access token:
With the following request body (type of
This call will return the
access_token you’ll need to make subsequent calls to the Support API.
A sample call might be:
This endpoint returns a count of machine to machine tokens used by all tenants under your umbrella account by month.
I hope this is helpful to someone, cheers!