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!