cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MustafaAlqanbar
Level: Powered On

Office 365 Users search User return incomplete

I'm building a PowerApp application that has to have a user search functionality. So I have ready select the office 365 user object. However, the combobox retrives limited result. For example, when I have tried to seach for my user, It wasn't retrive my account.

 

Office365Users.SearchUser({searchTerm:""}).DisplayName


On the other hand, once I use the MyProfile function to retives my account without any issue.

 

Office365Users.MyProfile().DisplayName

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Office 365 Users search User return incomplete

As I said, the solution is to make sure that you are using something in the search term when accessing users.  For example,

Office365Users.SearchUser({searchTerm:"Pau"}).DisplayName

Which would return the Display name for allthe users whose DisplayName or UserPrincipalName starts with "Pau".  Something more specific like that will probably get your return to less than 500 users.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Office 365 Users search User return incomplete

I suspect you are running into a delegation issue.  How many potential users might be returned by an open search term in your code?  If its more than 500 it will probably just find the first 500 matches and no more.  When I use Search user I always try to provide at least a minimal pattern to match to cut down on the results.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
MustafaAlqanbar
Level: Powered On

Re: Office 365 Users search User return incomplete

Thank for your reply, as you have ideintified the problem is "delegation issue". However, what is the solution. 

Dual Super User
Dual Super User

Re: Office 365 Users search User return incomplete

As I said, the solution is to make sure that you are using something in the search term when accessing users.  For example,

Office365Users.SearchUser({searchTerm:"Pau"}).DisplayName

Which would return the Display name for allthe users whose DisplayName or UserPrincipalName starts with "Pau".  Something more specific like that will probably get your return to less than 500 users.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

MustafaAlqanbar
Level: Powered On

Re: Office 365 Users search User return incomplete

Hi
It works, thanks a lot

Office365Users.SearchUser({searchTerm:ComboBox.SearchText}).DisplayName

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (6,199)