Live training: next batches coming soon. Join the waitlist:Waitlists open:Developer Training →Developer →Copilot Studio Training →Copilot Studio →

How to Get Current User Details in Power Apps [Email, Profile, User ID, Department]

PowerApps get current user – In this PowerApps tutorial, we will discuss Power Apps get current user details like display name, email, user ID, department, profile, etc.

Also, I will tell you what does mean by Power Apps User() Function, How to get the current user email in Power Apps, and many more like:

  • How to get user profile in Power Apps
  • Working with Power Apps get current user ID
  • Power Apps get user department

Power Apps User() Function

PowerApps User() is a function that helps return detailed information about the current user or the logged-in user.

Always, this PowerApps User function returns the record details of the current logged-in user. Detailed information means it will retrieve the current User Email address, User full name or user ID, User Department, etc.

NOTE:

PowerApps User() function will match the Account information that is displayed in the PowerApps players and studio that can be found outside of any authored apps. This may not match the current user’s information in Office 365 or other services.

Power Apps User() Function Syntax

The syntax of the Power Apps User() function is:

User()

The table below represents some PowerApps user() function properties with their descriptions:

PropertyDescriptionOutput
User()This function returns all the information about the current user (in PowerApps).{ FullName: “Alex Wilber”, Email: “AlexW@szg52.onmicrosoft.com”, Image: “blob:1234…5678” }
User().EmailThis Powerapps function returns the email address of the current user (in PowerApps)“AlexW@szg52.onmicrosoft.com”
User().FullNameThis Powerapps function helps to return the full name of the current user, including the first and last name.“Alex Wilber”
User().ImageThis function returns the image URL of the current user. But the image URL will appear with the form like “blob:identifier“. You can set the Image property of the Image control to this value to display the image in the app.“blob:5678…1234”

These are all about PowerApps user() function properties.

Power Apps Get Current User

To get the current user in Power Apps, we can use the User().FullName function.

Example:

Let me show you how to get the current user in Power Apps screen or form.

  • Sign in the PowerApps app with your valid Microsoft 365 credentials.
  • Create a blank new Canvas app and choose any one Layout, either Tablet or Phone.
  • On the PowerApps Blank screen, take these below input controls as:
    • Insert one Label control (Insert -> Label) and rename it to lblUserName.
    • Add one Text input control (Insert -> Input -> Text input) and rename it to txtUserName.
    • Select the text input control (txtUserName) and set its Default property as:
Default = User().FullName

Save and Preview (F5) the app. Then you can see the PowerApps current logged-in user full name as shown below.

PowerApps get current user

This way, we can get current user in Power Apps.

Power Apps Get User Email

We can use the User().Email function to get the current user email address.

Example:

  • On the PowerApps screen, insert a Label for UserEmail and a Text input control to display the value.
  • Select the text input control and set its Default property as:
Default = User().Email

Save and Preview (F5) the app. Then you can see the PowerApps current logged-in user Email Address as shown below.

PowerApps get current user email

This is how to get the user email id in Power Apps.

Power Apps Get User Profile

Here, we will see how to get the user profile in Power Apps using a simple scenario. This is also known as PowerApps Auto Fill User Profile Details.

Example:

All of the information about the currently logged-in user is included in the current user profile details (in Power Apps).

The user name, ID, email address, department, job title, etc. should all be included in the user information. We need to obtain this user data in a single Power Apps form.

Follow the below steps to do so:

  • I have created a SharePoint Online list named Employee User Profile. This list has the following columns:
ColumnDatatype
TitleSingle line of text
Employee NamePerson or Group Data type
Employee IDSingle line of text
Employee EmailSingle line of text
DepartmentSingle line of text
Job TitleSingle line of text

Refer to the image below:

PowerApps get current user profile
  • Create a Blank PowerApps Canvas app.
  • Connect the Office 365 Users Data source c