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
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (1,410)