cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mgodby
Post Patron
Post Patron

Is there a way to omit meeting rooms and service accounts from Office365Users.SearchUser()?

Hello. I am using Office365Users.SearchUser() and wondering if there's any way to omit the meeting rooms and service accounts? Is this possible?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Ashwin7104
Super User
Super User

@Mgodby - Please use the below code to exclude meeting rooms

Filter(Office365Users.SearchUser({searchTerm:TextInput2.Text}), AccountEnabled = true)

 

To exclude service accounts, I would suggest to use 'Not' statement and find some naming differences between user and service accounts. For example, if all service accounts are prefixed with 'SA', then you can say 

Not("#SA#" in DisplayName)

Below link can help you.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Exclude-Guest-users-from-list-of-Office-365-... 

View solution in original post

1 REPLY 1
Ashwin7104
Super User
Super User

@Mgodby - Please use the below code to exclude meeting rooms

Filter(Office365Users.SearchUser({searchTerm:TextInput2.Text}), AccountEnabled = true)

 

To exclude service accounts, I would suggest to use 'Not' statement and find some naming differences between user and service accounts. For example, if all service accounts are prefixed with 'SA', then you can say 

Not("#SA#" in DisplayName)

Below link can help you.

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Exclude-Guest-users-from-list-of-Office-365-... 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (2,761)