Announcements
Hello all,
Hope you can help me whith this.
I'm building an application where I need to choose a manager to see all user accounts having that manager.
From searching I found the linked subject. However that depends on the logged in user. I need it to depend on the manager.
Solved: Get all users with same manager info - Power Platform Community (microsoft.com)
I want to be able to choose a manager in a dropdown (already setup and working) and have all her/his employees popup in a gallery.
How does this look in your data source? Do you have a column for "Manager" and then another column for "Employee"?
If that's the case, your Items property in the Gallery would look something like this:
Filter(MyData, Manager = Dropdown1.Selected.Value)
But I can't provide a better example without know more about how your data is structured
Hey @PeterMattsson
You can use the Office365Users connector to get the direct reports for a specific user (direct reports being anyone who has that person listed as their manager in Azure Active Directory)
Cheers,
Sancho
Thanks Rusk,
I get the managers from a Microsoft 365 group as shown below.
Sort(Office365Groups.ListGroupMembers("<ObjectID>").value,displayName)
My data sources are:
Also I already got the managers.
By selecting a manager in my drop down I'd like to populate the gallery with his or her employees.
Thank you Sancho,
I'm all new to direct reports. Do you have any suggestions on how to do this?
Sure, happy to suggest how I'd do it:
Make the Items property of your gallery something like this (adjust for your dropdown name):
If( Len(ManagerDropdownName.Selected.mail)>0, Office365User.GetDirectReports(ManagerDropdownName.Selected.mail) )
Thank you so much!
Your suggested solution works perfectly.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 530
WarrenBelz 459 Most Valuable Professional
Haque 314