Introduction
Showing the photo of the user is a nice way to add a personal touch! For example, in the Outlook app (on Android at least), you can see your photo at the top left corner. One of the best ways to get ideas to make Power Apps feel more like native apps is to look at those native apps!
Tip - User function
To show the current logged in user's details, use the User() function. It provides access to the following details:
- FullName
- Image
Here is a quick illustration:
It is important to note that the information returned will match the "Account" information that is displayed in the Power Apps players and studio but may or may not match the information in Office 365. (Source: Microsoft Docs)
It is always a good idea to fetch either the entire record using the User() function or specific details like email using User().Email in a variable during the app. This helps to get rid of delegation issues when you want to use the email or name within other functions.
Stay tuned for the remaining 5 tips!
Recent articles
- A-Z: 26 tips! Learn how to improve your Power Apps!
- Add Picture vs Camera Control – Who is the winner?
- Background images for Power Apps screens – the right way!
- Combo box or Dropdown? - Who is the winner?
- Delegation in Power Apps – How to identify and test!
- Edit vs Display – Which is the better form?
- Formulas – How to learn the 170+ Power Apps formulas?
- Galleries vs Data Tables – How to pick between the two in Power Apps?
- Hyperlinks – How to launch web pages & apps in Power Apps!
- Icons – How to increase performance!
- Jump start – How to speed up Power Apps dev with components!
- Keyboard – How to control the keyboard type on mobile
- LastSubmit – How to fetch the last submitted record in Power Apps
- Media controls in Power Apps – How to improve user experience!
- New screens – How to speed up Power Apps dev using templates!
- OnStart – How to optimize app loading experience!
- Phone camera – How to switch cameras on Power Apps mobile!
- Quotes – Should you use single or double in Power Apps?
- Reset – How to reset a Power Apps gallery?
- SaveData – How to persist your Power Apps sessions!
- Tables – How to create tables in Power Apps
6 thoughts on “User – How to fetch current user’s details in Power Apps”