When an experiment is active, the Experiment Center injects theDocumentation Index
Fetch the complete documentation index at: https://auth0-feat-experiment-center.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
ExperimentContext object into supported Action triggers.
Supported triggers
Experiment context is available for Auth0 Actions with the following:post_logintrigger.pre_user_registrationtrigger.post_user_registrationtrigger.
The event.experimentation object
In supported triggers, the Experiment Center adds an experimentation field to the event object:
event.experimentation is null (not undefined) when no experiment is active. Always check before accessing properties.
config contains the full merged configuration
The config object contains every parameter defined on the feature flag, merged with the assigned variation’s overrides. You never need to look up baseline values or write fallback logic. If the parameter exists on the feature flag, it exists in config.
Null-safety pattern
Check for an active experiment before reading any properties:Example: post_login — conditional MFA policy
This example reads a boolean parameter and applies a different MFA policy depending on the variation.
ec.config.require_mfa.value is true for users in the treatment variation and false (the baseline) for users in the control variation. No fallback logic needed.
Example: post_login — set a custom claim based on variation
This example stamps the experiment assignment into the user’s ID token as a custom claim. Some analytics pipelines read token claims instead of tenant logs.
Example: pre_user_registration — variation-based metadata
This example uses a registration-flow experiment to set user_metadata based on which variant the registering user lands in.
Example: post_user_registration — trigger downstream enrollment
This example fires a webhook after registration based on the variation assigned to the new user.
Use the is_control parameter
is_control is true when the user is in the control group. Use it when you need to take an explicit action for control users, or to avoid running treatment-specific code on the control group.
config parameter values directly. They are more explicit and readable.
Read tenant logs
You do not need to write any code to get experiment metadata into your tenant logs. The Experiment Center enriches auth events automatically, regardless of what your Actions do. Theevent.experimentation object in Actions gives you access to the same context for branching logic; it is not the source of tenant log enrichment.