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
Responsive Resident
Responsive Resident

@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
Responsive Resident
Responsive Resident

@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

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,294)