Pull Office 365 User Data into Power Apps
One problem I ran into early when building Power Apps was working with user information.
Things like:
- Who is the current user?
- What department are they in?
- Who is their manager?
At first I handled this the wrong way — manually storing user data in lists or tables. That works for small demos, but it quickly becomes messy in real apps.
A better approach is using the Office 365 Users connector, which pulls user information directly from Microsoft 365.
Why This Is Useful
User data shows up in a lot of apps:
- approval workflows
- assigning records
- sending emails
- filtering data by user
Instead of maintaining a separate user list, you can pull the data directly from your organization’s directory.
Add the Office 365 Users Connector
In Power Apps Studio:
- Open Data
- Click Add data
- Search for Office 365 Users
- Add the connector
Once it’s added, you can start using it in formulas.
Get the Current User
Power Apps already provides a simple function:
User().FullName
User().Email
User().Image
For many apps, this is all you need.
Get More Profile Information
The Office 365 Users connector lets you retrieve additional profile data.
Office365Users.MyProfile()
Examples:
Office365Users.MyProfile().DisplayName
Office365Users.MyProfile().JobTitle
Office365Users.MyProfile().Department
Office365Users.MyProfile().Mail
This lets you display things like job title or department inside your app.
Get a User’s Manager
This is especially useful for approval apps.
Office365Users.Manager(User().Email).DisplayName
Get a User’s Manager
This is especially useful for approval apps.
Office365Users.Manager(User().Email).DisplayName
Or retrieve their email:
Office365Users.Manager(User().Email).Mail
Now approvals can automatically route to the correct manager.
Performance Tip
Avoid calling the connector repeatedly across many controls.
Instead store the profile in a variable when the app loads:
Set(varUserProfile, Office365Users.MyProfile())
Then reference the variable:
varUserProfile.DisplayName
varUserProfile.Department
varUserProfile.JobTitle
This keeps your app faster and formulas cleaner.
Final Thoughts
When I first started working with Power Apps, I didn’t realize how much useful data was already available through Microsoft 365 connectors.
Using the Office 365 Users connector makes it easy to:
- retrieve user profiles
- find managers
- personalize apps
Reduce manual data maintenance
If you're building internal business apps, this connector quickly becomes one of the most useful tools in Power Apps.
I’m currently documenting my Power Platform learning journey and sharing what I learn while building real apps.
Top comments (0)