Change8

5.0.0

Breaking Changes
📦 auth0View on GitHub →
7 breaking7 features🔧 7 symbols

Summary

This major release (v5.0.0) is a complete rewrite of the Auth0 Python SDK Management API, introducing a Fern-generated structure, Pydantic models, and automatic token management. Users migrating from v4.x must follow the provided migration guide due to significant breaking changes.

⚠️ Breaking Changes

  • Import paths changed from `from auth0.management import Auth0` to `from auth0.management import ManagementClient`.
  • Client initialization changed from `Auth0(domain, management_token)` to `ManagementClient(domain, client_id, client_secret)` with automatic token management.
  • Response types changed from dictionaries to Pydantic models (use `.model_dump()` to convert back to dict).
  • Method organization changed from flat (`client.users.list()`) to hierarchical where applicable.
  • Pagination parameters changed - some endpoints use `per_page`, others use `take`.
  • Python version requirement increased from ≥3.7 to ≥3.8.
  • Error handling changed from `Auth0Error` to `ApiError` base class.

Migration Steps

  1. Update import paths from `from auth0.management import Auth0` to `from auth0.management import ManagementClient`.
  2. Update client initialization to use `ManagementClient(domain, client_id, client_secret)` instead of `Auth0(domain, management_token)`.
  3. Update code to handle Pydantic models as responses; use `.model_dump()` if a dictionary is required.
  4. Review method calls for hierarchical structure changes.
  5. Review pagination parameter usage; check if endpoints now use `take` instead of `per_page` or vice versa.
  6. Ensure Python version is ≥3.8.
  7. Update error handling to catch `ApiError` instead of `Auth0Error`.

✨ New Features

  • New Fern-generated SDK: Complete Management API rewrite generated from Auth0's OpenAPI specifications.
  • Hierarchical package structure: Organized Management APIs into logical sub-clients for better discoverability.
  • Strongly typed interfaces: Pydantic models provide specific request/response types replacing generic dictionaries.
  • Automatic token management: Built-in client credentials handling with automatic token refresh.
  • Enhanced pagination: New `SyncPager` and `AsyncPager` classes for easy iteration over paginated results.
  • First-class async support: Full async/await support with `AsyncManagementClient`.
  • Better IDE support: Improved code completion, type hints, and inline documentation.

Affected Symbols