cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Help needed with People Picker for use against large Azure AD in a Power App

I'm currently using the Office365Users.SearchUserV2  connection and pass in the search term.   
Something like this Filter(Office365Users.SearchUserV2({searchTerm:varManagerName,top:20}).value,AccountEnabled= true && Not(JobTitle="student") && Not(StartsWith(Mail,"a-")))

This doesn't work effectively as we have 20,000 users in the Azure AD.

  • My understanding is that this has a hard-coded limit of returning 999 records 
  • Any Filter I wrap around the search result will only be applied to the 999 records returned.

So, what is the recommended option to create a staff search mechanism in a Power App that can effectively find any person with an active AD account?  Is there an option to filter prior to the actual search as in a delegable query of sorts?  
I did spend sometime searching for this but couldn't really find any clear and concise approach anywhere.  This seems to be a pretty standard problem, so I would assume that someone has solved this in a robust manner.  It would be great if that solution could be shared. 
Cheers, Andre

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @AndreSchlender,

Do you want to query delegable users using Office365Users.SearchUserV2?

Could you please share a bit more about your scenario?

 

The Office365Users.SearchUserV2 function does return limited users. A more elegant way is to search key word in the user display name within a Text Input and search based on it using a Combo Box.

 

Here is a demo I made for you, please check for reference:

1). Add a Text Input

2). Add a Combo Box and set the Items property as below: 

Office365Users.SearchUserV2({searchTerm:TextInput1.Text,top:999})

3). You could save the Combo Box selected user within a local collection to a Gallery by setting the OnChange property of the ComboBox using the Collect() function.

 

More details, please check Shane Young's video:

PowerApps Office 365 User Search - YouTube

Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi @AndreSchlender,

Do you want to query delegable users using Office365Users.SearchUserV2?

Could you please share a bit more about your scenario?

 

The Office365Users.SearchUserV2 function does return limited users. A more elegant way is to search key word in the user display name within a Text Input and search based on it using a Combo Box.

 

Here is a demo I made for you, please check for reference:

1). Add a Text Input

2). Add a Combo Box and set the Items property as below: 

Office365Users.SearchUserV2({searchTerm:TextInput1.Text,top:999})

3). You could save the Combo Box selected user within a local collection to a Gallery by setting the OnChange property of the ComboBox using the Collect() function.

 

More details, please check Shane Young's video:

PowerApps Office 365 User Search - YouTube

Best Regards,
Qi

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (4,359)