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 / Fetching logged in use...
Power Pages
Unanswered

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,368 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,368 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

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