Issue with Auth0 Management API: "Request to Webtask exceeded allowed execution time"

Regarding why the delete user endpoint isn’t called immediately:

  • When using the Management API to delete a user, Auth0 first attempts to perform some internal cleanup operations
  • This includes removing the user from any organizations, revoking refresh tokens, and cleaning up any associated data
  • Only after these operations complete does Auth0 call your custom database delete script
  • If these preliminary operations take too long, the webtask times out before reaching your script

These posts can help you explain why you receiving the error.

https://community.auth0.com/t/request-to-webtask-exceeded-allowed-execution-time-error-from-authorize-endpoint-or-oauth-token-endpoint/104471

If the issue persists, you could consider implementing a queue-based system for user deletion, where the Management API triggers a deletion request that gets processed asynchronously, though this would require additional infrastructure.