# I'm not able to display user data in email template

**URL:** <https://community.auth0.com/t/im-not-able-to-display-user-data-in-email-template/84932>\
**Category:** Get Help\
**Tags:** email, user, magic-link, user-metadata, auth0\
**Created:** [June 10, 2022, 9:40am UTC](https://community.auth0.com/t/im-not-able-to-display-user-data-in-email-template/84932 "2022-06-10T09:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sgurillo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgurillo/32/34155_2.png) [@sgurillo](https://community.auth0.com/u/sgurillo)\
**Post date:** [June 10, 2022, 9:40am UTC](https://community.auth0.com/t/im-not-able-to-display-user-data-in-email-template/84932/1 "2022-06-10T09:40:11Z")

</div>

I’m trying to display this code in the passwordless email template

```auto
 <strong>{{ application.name }}</strong>
              <strong>{{ user.name }}</strong>
              <strong>{{ user.user_metadata.exam_link }}</strong>
              <pre>
              {% for item in user %}
							  {{ item[0] }}: {{ item[1] }}
							{% endfor %}

```

But for some reason is not displaying all the user fields available (I want user name & metadata), is just displaying this fields: email, source\_ip, country, city, application name

I saw in the docs that user object is full available for customized emails

> **[Customize Email Templates](https://auth0.com/docs/customize/email/email-templates#common-variables)**
>
> Learn how to customize your emails with Liquid templating syntax.

What am I doing wrong??

---

<div class="post-metadata">

**Author:** ![alex.brett](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alex.brett/32/60157_2.png) [@alex.brett](https://community.auth0.com/u/alex.brett)\
**Post date:** [November 22, 2024, 11:24pm UTC](https://community.auth0.com/t/im-not-able-to-display-user-data-in-email-template/84932/2 "2024-11-22T23:24:43Z")

</div>

Hello @sgurillo!

When you’re talking about the passwordless email template, I’m assuming you’re talking about the `Verification Code for Email MFA` email template. The email templates can be configured with [Liquid Syntax](https://auth0.com/docs/customize/email/email-templates/use-liquid-syntax-in-email-templates) which it seems you’re doing in the sample code you posted. I would recommend going over the docs for [loops with tags](https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#for-loops) to ensure the syntax is correct. The code you are running is getting all the key value pairs from the user variable which contains all the fields you mentioned. If you would like the metadata instead, then running the code

```auto
{% for item in user.user_metadata %}
  {{ item[0] }}: {{ item[1] }}
{% endfor %}

```

should get all the values kept in the user metadata. If the `user.user_metadata.exam_link` is not showing up, I would suggest ensuring the field exists for the user you are trying to get it from.

Please let me know if this helps!

Best,  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [December 6, 2024, 11:25pm UTC](https://community.auth0.com/t/im-not-able-to-display-user-data-in-email-template/84932/3 "2024-12-06T23:25:09Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
