cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Samo2005
Frequent Visitor

Filter Office 365 by Location

Hi guys, 

 

I wonder if someone can help. I am new to PowerApps so be gentle :).

 

I can connect PowerApp to Office 365 users and I can retrieve user details. However, is there a way of filtering by Office (which we user for branch location) I have 12 branches and people don't know each other let alone name so I was hoping as well as finding by name is to filter by location and from there browse to the branch manager, assistant or sales etc...

 

Thank you

Wessam

2 ACCEPTED SOLUTIONS

Accepted Solutions
gabibalaban
Super User
Super User

Hi @Samo2005 ,

Is your organization a large one (more ther 1000 people - from what I know that's limit retreived by Office365Users.SearchUserV2() ?

 

If no, here is my thoughts:

- use a dropdown control (LocationDropDown) and a gallery control (ShowPeopleFromLocationGallery) and set this properties:

 

LocationDropDown: Items ->

Distinct(Office365Users.SearchUserV2({top:999}).value,OfficeLocation)

ShowPeopleFromLocationGallery -> 

Filter(Office365Users.SearchUserV2({top:999}).value,OfficeLocation=LocationDropDown.Selected.Result)

 

You must have completed data in your AzureAD about all users.

 

Hope it helps !

View solution in original post

Thank you very much. You are a star.

 

Regards

Wessam

View solution in original post

2 REPLIES 2
gabibalaban
Super User
Super User

Hi @Samo2005 ,

Is your organization a large one (more ther 1000 people - from what I know that's limit retreived by Office365Users.SearchUserV2() ?

 

If no, here is my thoughts:

- use a dropdown control (LocationDropDown) and a gallery control (ShowPeopleFromLocationGallery) and set this properties:

 

LocationDropDown: Items ->

Distinct(Office365Users.SearchUserV2({top:999}).value,OfficeLocation)

ShowPeopleFromLocationGallery -> 

Filter(Office365Users.SearchUserV2({top:999}).value,OfficeLocation=LocationDropDown.Selected.Result)

 

You must have completed data in your AzureAD about all users.

 

Hope it helps !

Thank you very much. You are a star.

 

Regards

Wessam

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,685)