How to Get Current User Information in Power Apps? [Name, ID, Email, Image]

While building the forms in Power Apps, there might be need to get the current user information, such as username, email, user ID, image, job title, department, location, etc.

In this article, I will explain how to get current user information in Power Apps, which includes the topics below.

  • Power Apps get current user login name
  • Power Apps get current user id
  • Power Apps get current user email
  • Power Apps get current user image
  • Power Apps get current user job title
  • Power Apps get current user department
  • Power Apps get current user phone number
  • Power Apps get current user type
  • Power Apps get current user location
  • Power Apps get current user manager name
  • Get Office 365 user details in Power Apps

How to Get Current User Information in Power Apps

In Power Apps, the User() helps get the logged-in user’s information. We can get the full name, ID, email, image, etc.

To get the remaining details, such as department, location, and job title, we can use the UserProfileV2(). However, to use this function, we need to connect with Office365Users.

how to get current user information in power apps

Let’s get started to get all the user information in Power Apps.

Power Apps Get Current User Login Name

First, create one canvas app in the Power Apps studio and then follow the below steps to get the user’s full name.

1. In Power Apps, on the +Insert tab, select the Text label.

powerapps get user display name

2. Set the Text property to this formula.

User().FullName
powerapps get current user full name

3. When you do this, the label is automatically populated with the user’s full name. Look at the reference image below; I got the current user name of the canvas app.

powerapps get display name from email

Power Apps Get Current User ID

To get the current user ID in the Power Apps application. Follow the steps below.

1. As mentioned above, add another Text label for the user ID. Then, paste the formula below on the Text property.

User().EntraObjectId
powerapps get current user employee id

2. Look at the below image; the label is automatically populated with the user ID.

powerapps get current user id

Power Apps Get Current User Email

Follow the steps below to get the current user email in Power Apps.

1. Insert one text label to display the email -> Provide the formula below in its Text property.

User().Email
powerapps get current user email

2. Now, the user email will displayed on the label. Refer to the image below.

how to get current user email id in powerapps

Power Apps Get Current User Image

To get the current user image in the Power Apps application. Follow the steps below.

1. On the +Insert tab, click Media, and then select Image.

powerapps get current user image

2. Set the Image property to this formula.

User().Image
powerapps get user photo from email

3. Set the image’s border to 50 if you want a round-shaped image. Look at the below image, I got the current user image.

display office 365 user profile images in powerapps

Power Apps Get Current User Job Title

Follow the steps below to get the current user job title in the Power Apps application.

Note:

Connect your app with Office365Users from the datasource before following the below steps.

1. In the Text property of the job title text label. Provide the formula below.

Office365Users.UserProfileV2(User().Email).jobTitle

Here, the UserProfileV2 will retrieve the profile of a provided user. User().Email will return the current user email; it returns the job title based on this email.

power apps get current user job title

2. Refer to the image below. We got the job title of the current user.

powerapps office365users job title

Power Apps Get Current User Department

To get the current user department in the Power Apps application. Follow the steps below.

1. Insert a Text label for the department. Then, provide the formula below in the Text property of the department text label.

Office365Users.UserProfileV2(User().Email).department
powerapps get user department

2. Look at the image below. The current user department was populated in the department label.

powerapps office365users filter by department

Power Apps Get Current User Phone Number

Follow the steps below to display the current user phone number in the Power Apps application.

1. Set the below formula on the Text property of the phone number text label.

Office365Users.UserProfileV2(User().Email).mobilePhone
powerapps office365users phone number

2. Refer to the image below. I got the phone number of the current user.

powerapps get user phone number

Power Apps Get Current User Type

Follow the steps below to get the current user’s type, such as owner, member, or guest user.

1. Add one Text label for user type, then provide the below formula in its Text property.

Office365Users.UserProfileV2(User().Email).userType
powerapps get user profile

2. Now, look at the example below. I got the current user type.

powerapps office365users get user by email

Power Apps Get Current User Location

Follow the steps below to get the current user location in the Power Apps application.

1. Use the formula below in the country text label’s Text property.

Office365Users.UserProfileV2(User().Email).country
powerapps get user country

2. Then, the country name of the current user will automatically be displayed in the country text label.

powerapps get the current user country

Using the formulas I explained above, you’ll get all this information about the current user.

Get Office 365 User Details in Power Apps

Here, I have a Power Apps application that displays selected user details, like display name, department, user ID, job title, etc.

powerapps get current user display name

Follow the below steps to get the information of a selected Office 365 user in the Power Apps application.

1. Create one blank canvas application -> Then connect with the Office365Users from the Data.

2. Insert one Combo box control -> Then, it will pop up a Select a data source tab, select Office 365Users.

powerapps get current user login name

3. In the Items property of combo box control put the below formula.

Office365Users.SearchUser({searchTerm:ComboBox1.SearchText})

Here, the SearchUser function will retrieve search results of user profiles.

powerapps current user in person field

4. Now, open the Properties of combo box control. In the Fields, click on Edit. Then, one new section will appear on the left side of the properties, as shown below.

powerapps combobox defaultselecteditems person
  • Set the Layout to Double: It determines how the items in the combo box are displayed.
  • Set Primary text to DisplayName: it ensures the user’s name is displayed in the combo box.
  • Set Secondary text to the Department: It can provide additional context about the user.
  • SearchField to DisplayName: This specifies that users are searching for their display name. Assigning the display name to the search field will retrieve the users’ display names.

4. Now, save and preview once. The combo box will display all the Office365 users.

powerapps get user profile

5. Look at the above example; it allows multiple selections of users. So, turn Off the Allow multiple selection property.

powerapps office365users.searchuser

6. Now that we have all the Office365 users, let’s see how to get the selected user information.

We are using the LookUp function to get the selected user information. As you already did in the above examples, paste the formulas below into the Text property of respective text labels.

User Display Name:

LookUp(ComboBox1.SelectedItems,1=1).DisplayName

User Department:

LookUp(ComboBox1.SelectedItems,1=1).Department

User ID:

LookUp(ComboBox1.SelectedItems,1=1).Id

User Email:

LookUp(ComboBox1.SelectedItems,1=1).Mail

User JobTitle:

LookUp(ComboBox1.SelectedItems,1=1).JobTitle

User Country:

LookUp(ComboBox1.SelectedItems,1=1).Country

7. After putting all the formulas in the text property of their respective text labels. Save the app and preview it once; you’ll get the selected user’s information.

Additionally, you may like some more Power Apps articles:

I hope you found this article useful. I have explained how to get the current user information and selected Office365 user information here.

You can use the above formulas to obtain the current user information in the Power Apps application.

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…