Auth0 Sandbox Error Occurs During User Creation via UI When Using Pre-Built Fields

Overview

When using the Auth0 Dashboard to manually create users via the User Management tab, a "Sandbox Error: invalid_request" error occurs if a Pre-User Registration Action script executes an api.access.deny() command. This happens because the Auth0 Dashboard does not supply the custom Universal Login Page form fields required by the Action. Modifying the Action to include conditional logic that bypasses strict validation when creating a user via the Management API or Auth0 Dashboard resolves the issue.

 

When this error occurs, Auth0 generates the following message:

 

"Sandbox Error: invalid_request"

 

{
"statusCode": 400,
"error": "Bad Request",
"message": "Sandbox Error: invalid_request"
}

Applies To

  • Auth0
  • User Management
  • Actions (Pre-User Registration)
  • Auth0 Dashboard

Cause

The issue originates from a Pre-User Registration Action that explicitly calls api.access.deny('invalid_request', ...) if custom fields, such as ulp-given-name, ulp-family-name, or ulp-birthday, are missing from event.request.body.

 

Since the Auth0 Dashboard uses the Management API to create users, it does not supply these custom Universal Login Page form fields in the payload. Consequently, the Action intentionally blocks the creation attempt, which Auth0 surfaces as a Sandbox Error.

Solution

How is the "Sandbox Error: invalid_request" error resolved during user creation?

Modify the Pre-User Registration Action to include conditional logic that bypasses strict validation when a user is created via the Management API or Auth0 Dashboard.

  1. Open the Auth0 Dashboard and go to Actions > Flows > Pre User Registration.
  2. Select the custom Action that validates the custom Universal Login Page fields.
  3. Add conditional logic to check event.client.client_id against the specific front-end application Client ID. This ensures the validation only executes when the request originates from the Universal Login Page.

Recommended content

No recommended content found...