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

Office365Users.SearchUser filter results

Hello,

 

I've been tinkering with my own version of the "Org Browser" from scratch and its starting to look like something usable.

But how do I remove all the unwanted results from our Azure AD? I seem to be getting shared mailboxes, contacts and some admin users in my result. Is there a way to only show a specific set of company names or to display only the ones that have a company name set? 

 

 

I use a search field and populate a gallery with the "Office365Users.SearchUser" function.

 

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
dinusc
Microsoft
Microsoft

That should be possible. For example, remove all the items with empth (blank) company names:

ComboBox1.Ittems=Filter(Office365Users.SearchUser({searchTerm:""}), IsBlank(CompanyName)=false)

 

Similarly you can match the company by a predefined or configured value (from a TextInput control for example)

View solution in original post

2 REPLIES 2
dinusc
Microsoft
Microsoft

That should be possible. For example, remove all the items with empth (blank) company names:

ComboBox1.Ittems=Filter(Office365Users.SearchUser({searchTerm:""}), IsBlank(CompanyName)=false)

 

Similarly you can match the company by a predefined or configured value (from a TextInput control for example)

View solution in original post

That worked like a charm. I've been trying to wrap my head around the filter function for a while now Smiley Very Happy

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (81,721)