web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Portal user object emp...
Power Pages
Answered

Portal user object empty in Liquid despite successful authentication - Contact resolution failing

(0) ShareShare
ReportReport
Posted on by 3
I'm working on a Power Pages site where I need to resolve the authenticated user's Contact record in Liquid to display personalized form based on Contact → Account relationship.
 
Issue
Despite successful authentication (user sees their name in the header and `{% if user %}` returns true), the `user` object in Liquid does not expose `username`, `email`, or `name` fields:

{{ user.username }} <!-- empty -->
{{ user.email }}    <!-- empty -->
{{ user.name }}     <!-- empty -->
{{ user | json }}   <!-- returns minimal/empty object -->
```
Environment
- Power Pages (modern)
- Local authentication provider
- Contact record exists with:
  - `adx_identity_username`: "NancyAnderson"
  - `emailaddress1`: "sample_c@example.com"
  - `parentcustomerid`: linked to Account
- External Identity (`adx_externalidentity`) exists with:
  - `adx_username`: "NancyAnderson"
  - `adx_identityprovidername`: "Local"
  - `_adx_contactid_value`: correctly points to Contact GUID
 
What I've tried
1. Cleared portal cache multiple times
2. Reset local password and re-authenticated
3. Verified Contact and External Identity records are correctly linked
4. Checked that "Login Enabled" is true on Contact
5. Used FetchXML to search for Contact by `adx_identity_username`, `emailaddress1`, and `fullname` — no results (because `user.username`/`user.email` are empty)
 
Questions
1. In modern Power Pages, what is the correct way to access the authenticated user's Contact record in Liquid when `user.username`/`user.email` are not populated?
2. Is there a `user.id` or `user.contact.id` field I can use directly?
3. Should I use a different approach (e.g., Web API calls from JavaScript) to resolve the Contact on the client side?
4. Are there specific portal settings or authentication configurations that enable population of `user.username`/`user.email` in Liquid?
 
Goal
Retrieve the authenticated user's Contact → Account relationship server-side (Liquid) to filter and display relevant data without relying on client-side workarounds.
Any guidance or examples would be greatly appreciated!
 
Categories:
I have the same question (0)
  • Verified answer
    Fubar Profile Picture
    8,340 Super User 2025 Season 2 on at
    I am not sure if it is just that you are using the incorrect attribute names or not. As the 'user' object is the contact record the attribute names are the columns lowercase logical schema names (you can see this under advanced in the column properties) e.g. in your example user.name should be user.fullname or user.firstname (and not email but something like user.address1email) etc similarly columns that are not core dataverse columns will have a prefix and so the attrubute on the user object would include the prefix as well  user.adx_restofthecolmnname
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Pages

#1
Jerry-IN Profile Picture

Jerry-IN 71

#2
Fubar Profile Picture

Fubar 62 Super User 2025 Season 2

#3
sannavajjala87 Profile Picture

sannavajjala87 31

Last 30 days Overall leaderboard