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 Apps / Showing the Azure User...
Power Apps
Answered

Showing the Azure User ID on Power App

(0) ShareShare
ReportReport
Posted on by 440

Hi guys,

 

I am wanting to put a label on the front page of my app showing the current users ID as per the attached photoshopped image.

 

I have the Office 365Users data linked each time I try this I never seem to get the correct formula 

nshaw75_0-1713555521964.png

 

 

 

Categories:
I have the same question (0)
  • Akah Mandela Profile Picture
    445 on at

    you tried User().EntraObjectId ?

  • nshaw75 Profile Picture
    440 on at

    Hi @mandela 

    Thank you for the reply.  I have not tried this, where would I put this code, 

  • Akah Mandela Profile Picture
    445 on at

    in the label's text property 

  • nshaw75 Profile Picture
    440 on at

    hI @mandela  I have entered this formula into the Text property of the Text label and it returns a long string of numbers which I presume is my ID, but it doesn't show my name or profile picture.

     

  • Verified answer
    trstrean Profile Picture
    185 on at

    Not quite what you asked for, but I think it will accomplish what you are looking for.  If you go to the app on start, you could add the following information:

    Concurrent(
        Set(varUser,User()),
        Set(varUserEmail,User().Email),
        Set(varUserImage,User().Image),
        Set(varUserName,User().FullName)
    )
    Then in a label, you just set the text to one of those global variables such as varUserName and it will display within the label.  It would make all of those visible throughout the application. 
     
    The new modern control header does something similar to this automatically, but doesn't get the user name for some reason.
    If this answered your question, please accept as the solution.
  • nshaw75 Profile Picture
    440 on at

    Hi @trstrean , thank you, This has got me there or thereabouts. I have managed to put in the label the User Name which is what I wanted to do. I only get a string returned when I try it with the User Image. This is not a massive issue. I almost didn't get anything until I relaised I needed t "Run OnStart" 🙂

    Thank you very much for your help.

  • Verified answer
    trstrean Profile Picture
    185 on at

    My pleasure!  I'm glad it worked out for you.  For the user image, just add an image control and set the property like you did for the username and it should work for you.  If you turn on modern controls, a header has been added that I believe already includes the logic to display the user image.  That might save you some time 🙂

  • nshaw75 Profile Picture
    440 on at

    @trstrean  many thanks this is perfect. 

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard