When to customize Adaptive MFA
You should only consider customizing Adaptive MFA if your users are enrolled in MFA and are required to use an email as an identifier.
- At what confidence level do you want to trigger MFA?
- How do you want to measure risk?
- Do you want Auth0 to measure confidence or do you want a custom measurement?
- How will you handle users who are not enrolled in MFA?
Confidence scores
Adaptive MFA calculates an overall confidence score based on the analysis of three assessments:NewDevice, ImpossibleTravel, and UntrustedIP. To learn more, read Adaptive MFA: How it works.
Each assessment has its own confidence score, and each confidence score has an associated action:
| Confidence score | Description | Action |
|---|---|---|
low | Login transaction does not match patterns previously displayed by user. | Require MFA. |
medium | Login transaction somewhat matches patterns previously displayed by user. | Do not require MFA. |
high | Login transaction closely matches patterns previously displayed by user. | Do not require MFA. |
neutral | N/A. Reserved for future use. | N/A. Reserved for future use. |
View examples of high- and low-risk scenarios with different confidence scores.
View examples of high- and low-risk scenarios with different confidence scores.
The following table describes high-risk scenarios that result in a
The following table describes low-risk scenarios that result in a
low confidence score:| User State | Desired Login Friction | Desired Enrollment Policy | Implementation |
|---|---|---|---|
| Enrolled in MFA | Do not require MFA | N/A (user already enrolled) | Use an Action to bypass MFA |
| Not enrolled in MFA | Require email verification | Skip enrollment (do not collect additional authenticators) | Default behavior (no MFA-related Action) |
| Not enrolled in MFA | Require email verification | Require MFA enrollment (collect additional authenticator) | Use an Action to force MFA enrollment (template available) |
high confidence score:| User State | Desired Login Friction | Desired Enrollment Policy | Implementation |
|---|---|---|---|
| Enrolled in MFA | No friction | N/A (user already enrolled) | Default behavior (no MFA-related Action) |
| Not enrolled in MFA | No friction | Skip enrollment (do not collect additional authenticators) | Default behavior (no MFA-related Action) |
| Not enrolled in MFA | No friction | Require MFA enrollment (collect additional authenticator) | Use an Action to force MFA enrollment (template available) |
riskAssessment object, which contains the overall confidence score, versioning information, and details of the individual assessments.
You can view the full description, properties, and values of the riskAssessment object in the post-login Actions trigger riskAssessment reference.
Action result outcomes
Actions that trigger MFA take precedence over default Adaptive MFA behavior.
low.
The following table shows the possible outcomes based on the combination of Actions and default Adaptive MFA policy actions.
| Action result | Adaptive MFA action | Outcome |
|---|---|---|
| Unauthorized | Trigger MFA | Unauthorized |
| Unauthorized | No MFA Required | Unauthorized |
| Trigger MFA | Trigger MFA | Trigger MFA |
| Trigger MFA | No MFA Required | Trigger MFA |
| No MFA Required | Trigger MFA | Trigger MFA |
| No MFA Required | No MFA Required | No MFA Required |
Action templates
Auth0 provides two Action templates based on Adaptive MFA for you to customize: Adaptive MFA and Require MFA Enrollment.Adaptive MFA template
This template provides an example and starting point for how to build a custom business flow using individual risk assessments.Require MFA Enrollment template
This template demonstrates how you could enforce MFA enrollment when using a standard or Adaptive MFA policy. It usesevent.user.multifactor to check if the user is enrolled in MFA, and if they’re not, prompts for enrollment.
Action use cases
Here are some suggestions for how to build custom Actions based on your use case.Perform an action if overall confidence score is X
Perform an action if overall confidence score is X
Assess the
riskAssessment.confidence property, and then compare it with the constants high, medium, or low:Perform an action if confidence score is above or below X
Perform an action if confidence score is above or below X
Confidence scores are discrete values—not in a range—so you cannot use comparison operators (such as
< or >) to evaluate multiple values in a single condition.Use multiple conditions to logically combine all the confidence scores you want to handle. For example, if you want to know when the confidence score is greater than low, check if it’s equal to medium or high:Get additional details if overall confidence score is X
Get additional details if overall confidence score is X
The
riskAssessment object is saved in your tenant logs. You can view log entries to see the risk assessment score and the determining factors (reasons).You can view the riskAssessment object and report the results elsewhere. For example, you can send an email or save a record in an external database.Perform an action if a specific assessment has a specific result
Perform an action if a specific assessment has a specific result
Use the
assessments object to access the details for individual assessments, including the code property:Aggregate assessments for a custom overall confidence score.
Aggregate assessments for a custom overall confidence score.
Use the
assessments object to access the details for individual assessments, and then use the confidence property, the code property, or both.Block current transaction and return error and message if a specific assessment has a specific result
Block current transaction and return error and message if a specific assessment has a specific result
Use the This redirects the user back to the application’s callback URL with the
assessments object to access the details for individual assessments, including the code property.Block the login transaction from completing by returning the callback function with an UnauthorizedError object as the error parameter. The UnauthorizedError object always sets error to unauthorized, but you can customize the error_message:error and error_message parameters included.Safely handle when Auth0 fails to execute assessments
Safely handle when Auth0 fails to execute assessments
Auth0 automatically assigns a
low confidence score if there is any sort of failure performing the risk assessment.To mitigate this scenario, use the assessments object to inspect the code property for each individual assessment and check if the value is set to assessment_not_available.