Cognito CustomMessage_AdminCreateUser mandatory use of {username} in template

0

I would like to use email or preferred_username in a template for CustomMessage_AdminCreateUser.

But it seems that Cognito requires that {username} must be present in a template, otherwise the default message is sent.

We cannot use "username" as we use this attribute to store uuid for a user. Including it in a message does not make sense.

Is there any way of preventing Cognito checking the presence of {username} in a template so the other attributes can be displayed as well?

Vasyl
asked 2 years ago195 views
1 Answer
1

Unfortunately, as you described, the username parameter is required. If it is missing, the default message template is used. A possible workaround is to use a HTML tags to hide the username value but this does not remove the username from the message. Again, a username parameter is required in the template.

AWS
Taka_M
answered 2 years ago
  • Thanks for the reply. Any plans to allow to use "alternative usernames/aliases" in templates any soon? HTML Workaround does not seem like a good option.

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