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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Fetching logged in use...
Power Pages
Answered

Fetching logged in users account name in power apps portals

(0) ShareShare
ReportReport
Posted on by 642

Hello community experts, 

 

There is an urgent requirement where I need to fetch only single field that is account name of the logged in user from CDS and display in the middle of the home page 

 

How do i fetch only this specific field? 

Kindly guide 

 

Best regards, 

Sumaira

Categories:
I have the same question (0)
  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    Hi @Sumaira 

     

    You can access all contact attributes (inclusive custom attributes) with the user liquid object

    As the account is a lookup, to get the name all you need is adding .Name, for example:

    <div>
     Account --> {{ user.parentcustomerid.Name }}
    </div>

     


    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Sumaira Profile Picture
    642 on at

    @OliverRodrigues thanks a lot for the response 

    I'll try it and get back 

    Regards 

    Sumaira 

  • Sumaira Profile Picture
    642 on at

    @OliverRodriguesThanks a lot

    I was able to fetch the account name

    But when i try to fetch account number it is showing blank

    <p> Account Name Account Number</p>
    <div>{{ user.parentcustomerid.Name }}</div>
    <div>{{ user.parentcustomerid.AccountNumber }}</div>
    @OliverRodriguesPlease guide
    Best Regards,
    Sumaira
  • Verified answer
    oliver.rodrigues Profile Picture
    9,482 Most Valuable Professional on at

    hi 

     

    You won't be able to access the account phone number directly via user object

     

    Basically the {{ user }} object will have all attributes for the Contact entity

    parentcustomerid is an attribute of type Entity Reference, so you can access the Id and Name using dot notation

     

    to access more of Account data, you will have to to a simple retrieve to the Account entity, as you already have the id

    try the following, or something link the below.. and then you will have access to the Account attributes

    {% assign account = entities.account[user.parentcustomerid.Id] %}

     

    Take a look at the documentation for a more information:

    https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-objects

     

  • Sumaira Profile Picture
    642 on at

    @OliverRodriguesThanks a lot for the help 🙂

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Valantis Profile Picture

Valantis 39

#2
sannavajjala87 Profile Picture

sannavajjala87 36 Super User 2026 Season 1

#3
11manish Profile Picture

11manish 24

Last 30 days Overall leaderboard