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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

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 (5,722)