aws cognito ai_generated true

An error occurred (UserNotConfirmedException) when calling the InitiateAuth operation

ID: aws/cognito-user-not-confirmed

Also available as: JSON · Markdown
95%Fix Rate
96%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

Cognito user exists but hasn't confirmed their email/phone.

generic

Workarounds

  1. 93% success Resend confirmation code: aws cognito-idp resend-confirmation-code --client-id <id> --username <user>
    User receives a new code to confirm their account

    Sources: https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html

  2. 90% success Admin-confirm the user: aws cognito-idp admin-confirm-sign-up --user-pool-id <id> --username <user>
    Bypasses the confirmation flow — useful for testing or support

Dead Ends

Common approaches that don't work:

  1. Deleting and recreating the user 70% fail

    Loses any associated data; user must re-register

  2. Disabling email verification on the user pool 75% fail

    Removes a security measure; can't retroactively confirm existing users

Error Chain

Frequently confused with: