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

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
Frequent Visitor

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
Frequent Visitor

Re: Office 365 Users search User return incomplete

Hi
It works, thanks a lot

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

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,836)