Updating value of a required cognito attribute: Impossible?

1

Do the following:

  1. Create a cognito user pool where email is the sign-in and name and phone_number are required attributes (and allow self-registration).
  2. Use the hosted UI to register an account with the user pool. Be sure to make a typo in your phone number.
  3. Go to the console UI and try to edit the phone number. Note that it is greyed out and uneditable.
  4. Try using aws cognito-idp admin-update-user-attributes to update the phone number. Note that you get an "(InvalidParameterException) when calling the AdminUpdateUserAttributes operation: user.phone_number: Attribute cannot be updated." error.
  5. While logged in as the user, try to use the cognitoidentityserviceprovider.updateUserAttributes API call to update the phone number. Note that you once again are told that the phone_number attribute cannot be updated.

Is there any way to fix the user's phone number in this case? I did see https://repost.aws/questions/QUnbai89EJThyvfcvTMxgoxQ/allow-a-user-to-fix-phone-number-attribute-during-sign-up , but before I go blow up my entire user pool an re-create it with no phone_number requirement I thought I'd double-check and see if there was any other solution.

noah10
asked 2 years ago95 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions