Monitoring Auth0 Tenant Quota Usage and Statistics

Overview

This article outlines methods for monitoring tenant usage and statistics, specifically active users, daily login and signup activity, and Machine-to-Machine (M2M) token usage. The methods involve using the Auth0 Management Application Programming Interface (API) and Log Streams because direct data from an internal usage report (e.g., https://support.auth0.com/api/reports) is not accessible without authentication and cannot be obtained without human interaction.

Applies To
  • Auth0 Management API
  • Log Streams
  • Monitoring active users
  • Tracking daily activity
  • Monitoring M2M token consumption
Solution

Utilize the Management API statistics endpoints and implement Log Streams to monitor tenant usage.

 

1. Monitor Tenant Statistics via Management API

  • The Management API offers specific endpoints to retrieve tenant statistics.
    • Active Users
      • Endpoint: GET /api/v2/stats/active-users
      • Purpose: Returns the number of active users in the tenant.
      • Documentation: Get Active Users
    • Daily Activity (Logins, Signups, Breached Passwords)
      • Endpoint: GET /api/v2/stats/daily
      • Purpose: Retrieves the number of logins, signups, and breached-password detections that occurred each day within a specified date range.
      • NOTE: Monitoring breached-password detections may require a specific subscription.
      • Documentation: Get Daily Stats

2. Monitor M2M Token Usage

  • Monitoring Application Programming Interface usage, such as M2M token consumption, is most effectively done using Auth0's Log Streaming service.
    • Use Log Streams to export tenant logs to a log analysis service (for example, Splunk, Amazon Web Services Kinesis).
    • The exported logs can then be filtered to identify events related to token issuance or consumption, including M2M tokens.
    • Create custom reports to monitor usage against limits.

3. Use Log Streams for Comprehensive Reporting

  • Log Streams provide the most flexible solution for monitoring and reporting a wide range of tenant activities.
    • By exporting all logs, granular control over the data is gained.
    • Build customized reports that address specific monitoring needs for development and staging environments.
    • DocumentationLog Streams

Recommended content

No recommended content found...