Support all profile fields in email EL expressions

Here’s my scenario:

  • I’m customized the email template for activation emails sent to my users
  • I use the displayName field (which is a default Okta user profile field) to store the user’s preferred name, which could differ from their given/legal name

I tried to use {user.displayName} in the email template, but it failed silently. There was no error message, but my changes weren’t saved. I was confused until I checked the JavaScript console and saw that the network call errored.

The User Model and EL documentation don’t give any indication that this field is unsupported in EL expressions, but way down on this page is a list of supported variables in email templates that excludes displayName. From this I gathered that you can’t use user.displayName in email templates, although it seems like a strange omission.

My feature suggestions:

  • If an unsupported variable is entered into an email template, I’d expect to get an error telling me what’s wrong
  • It would be great to be able to use user.displayName in email templates!

Hi @nate.barbettini

Thank you for the feedback. At the moment, we have only a few user attributes available in the user activation emails: user.login, user.email, user.secondEmail, user.firstName, user.lastName and user.locale. You can find all the available user attributes here under Customization Variables >> User Activation (Welcome email).

I agree that the list of attributes can be extended to support display name and also other attributes, including the custom ones.