Introduction

One of the biggest strengths of Power Apps is its ability to deliver a personalized user experience. Instead of building one static app for everyone, Power Apps allows you to adapt the UI dynamically based on the logged-in user.

Using built-in functions like:

you can:

In this article, we’ll explore how to use these functions effectively to build dynamic, user-aware Power Apps.

  1. Understanding the User() Function

    The User() function returns information about the currently logged-in user.Syntax

User()

Properties Returned

PropertyDescription
User().FullNameUser’s display name
User().EmailUser’s email address
User().ImageUser Profile Image

Example

Label.Text = "Welcome " & User().FullName

2. Understanding the Office365Users Connector

The Office365Users connector retrieves detailed profile data from Microsoft Entra ID (Azure AD).

Commonly Used Functions

Office365Users.MyProfile()
Office365Users.UserProfile(User().Email)
Office365Users.Manager(User().Email)
Office365Users.DirectReports(User().Email)
  1. Personalized Dashboards

    Personalized dashboards show only relevant data to each user.

    Example: Show User’s Assigned Records

Filter(
    Projects,
    AssignedTo.Email = User().Email
)

Each user sees only their projects, without creating multiple apps.

  1. Role-Based Dashboard View

    Assume:

    • Managers see all records

    • Employees see only their own

If(
    Office365Users.MyProfile().JobTitle = "Manager",
    Projects,
    Filter(Projects, CreatedBy.Email = User().Email)
)

5. Auto-Fill Logged-In User Information

Auto-Fill Name & Email in Forms

Set Default property:

User().FullName
User().Email

  1. Auto-Fill Advanced Details

Office365Users.MyProfile().Department

7. Display User Profile Picture

Office365Users.UserPhoto(User().Email)

8. Security Trimming the UI (Role-Based Access)

Security trimming means hiding or disabling UI elements based on user role.

Hide Controls for Non-Admins

If(
    User().Email in AdminEmails,
    true,
    false
)
  1. Disable Buttons for Read-Only Users

If(
    User().Email = Record.CreatedBy.Email,
    DisplayMode.Edit,
    DisplayMode.View
)

10 . Department-Based UI Control

If(
    Office365Users.MyProfile().Department = "Finance",
    true,
    false
)

Example:

Conclusion

Using User() and Office365Users functions enables dynamic, intelligent, and secure Power Apps. From auto-filling user details to implementing role-based dashboards and UI security trimming, these functions are essential tools for building enterprise-ready apps.

When used correctly, they significantly improve: