Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - Power Apps Portals
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

  • Sumaira Profile Picture
    642 on at
    Re: Fetching logged in users account name in power apps portals

    @OliverRodriguesThanks a lot for the help 🙂

  • Verified answer
    oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: Fetching logged in users account name in power apps portals

    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
    Re: Fetching logged in users account name in power apps portals

    @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
  • Sumaira Profile Picture
    642 on at
    Re: Fetching logged in users account name in power apps portals

    @OliverRodrigues thanks a lot for the response 

    I'll try it and get back 

    Regards 

    Sumaira 

  • Verified answer
    oliver.rodrigues Profile Picture
    9,342 Most Valuable Professional on at
    Re: Fetching logged in users account name in power apps portals

    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.

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 60 Super User 2025 Season 1

#2
Fubar Profile Picture

Fubar 55 Super User 2025 Season 1

#3
surya narayanan Profile Picture

surya narayanan 35