- Newest
- Most votes
- Most comments
The issue you're experiencing with resetting MFA in your AWS Cognito User Pool is complex and involves several factors. Let's break down the problem and provide some guidance:
-
MFA Reset Process: The method you're using to reset MFA using AdminSetUserMFAPreference is correct. This should disable all MFA settings for the user.
-
Risk-Based Authentication: Your User Pool is configured with Adaptive Authentication, which is still triggering MFA prompts based on risk assessment, even after you've reset the MFA settings. This is because risk-based authentication operates independently of the user's MFA settings.
-
Persistent MFA Prompt: The fact that the user is still prompted for MFA after a risk decision, even when MFA has been reset, suggests that there might be a cached or persisted state related to the user's previous MFA setup.
To resolve this issue, you can try the following steps:
-
Disable MFA completely for the user: Use the AdminDisableUserMFA API call to remove all MFA settings for the user.
-
Clear user attributes related to MFA: Use AdminUpdateUserAttributes to remove any MFA-related attributes that might be persisting.
-
Force password reset: Use AdminResetUserPassword to force a password reset for the user. This can help clear any cached authentication states.
-
Review Adaptive Authentication settings: Consider adjusting your Adaptive Authentication settings if you don't want MFA prompts for low-risk scenarios.
-
Re-enable MFA if needed: After successfully logging in without MFA, the user can set up MFA again using the AssociateSoftwareToken, VerifySoftwareToken, and SetUserMfaPreference methods.
If the issue persists after trying these steps, it may be worth contacting AWS Support directly, as there could be a specific configuration or edge case in your User Pool that's causing this behavior.
Remember, when working with MFA and security settings, it's crucial to balance security needs with user experience. Always test thoroughly in a non-production environment before applying changes to your live User Pool.
Sources
Cognito_MFA_Reset_or_reconfigure_for_user | AWS re:Post
AWS Cognito: Reset MFA device | AWS re:Post
Adding MFA to a user pool - Amazon Cognito
answered 2 years ago
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated a year ago

AdminDisableUserMFAAPI call, but it doesn't appear to exist in the AWS Cognito API documentation.