cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simon-int
Level: Powered On

Office365Users.SearchUser only returning limited results

I am trying to return a list of All staff at a particular office.

The Gallery object has just a very basic:

Filter(Office365Users.SearchUser(), OfficeLocation = "Sydney")


But with this only 6 records are returned??

Strangely, if I search on "Melbourne" instead 17 records are returned.  I cannot figure out why the result sets are so limited, there are ~100-200 employees at these locations.

The same thing happens if using 'City' or other location based parameters.

Searching in the standard search screen by common names like John returns more than 6 rows in some cases.

I have seen examples online referencing {top:100} but this syntax doesn't work at all for me.
I have changed the Data row limit in app settings, it doesn't make any difference. (Result set of 500 would be more than enough, in this case.)

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Office365Users.SearchUser only returning limited results

Hi @simon-int ,

Which Office 365 license do you have for your Office 365 account?

Are you a Global Administrator within your Office 365 tenant?

 

Currently, I could not reproduce your issue on my side (On my side, I own Office 365 E5 license for my Office 365 account). Please consider ask your Administrator to assign Global Administrator Role to you within your Office 365 Admin Center, then go to your app, re-create a new conection to the Office 365 Users connector, check if the issue is solved.

 

If the issue still exists, please submit an assisted supported ticket through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

To resolve this error when using top:999

 

I added another Office 365 Users Data Connector and removed the first one. For some reason, it works fine now.

9 REPLIES 9
Community Support Team
Community Support Team

Re: Office365Users.SearchUser only returning limited results

Hi @simon-int ,

Currently, within PowerApps, there are some known issue with the Office365.SearchUser() function.

 

In default, the Office365.SearchUser() function could only retrieve 100 records. On your side, please consider modify your formula as below:

Set the Items property of the Gallery to following:

Filter(
Office365Users.SearchUser({searchTerm:"", top:500}), /* <-- Type 500 rather than 100 */
OfficeLocation = "Sydney"
)

 

The user @JonFrost has faced same issue with you, please check the response within the following thread:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/Office365-users-show-all-users-from-dep...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

I have read that and seen the {top:500} syntax referenced elsewhere, however- I cannot get it to work, ever. See attached.

 

I am experiencing a similar issue to this.

Community Support Team
Community Support Team

Re: Office365Users.SearchUser only returning limited results

Hi @simon-int ,

Based on the screenshot that you mentioned, I think there is something wrong with the connection you created to the Office 365 Users connector from your app.

 

Please consider re-create a new connection to the Office 365 Users connector from your app, then try above formula I provided above, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

This is completely out of the box, connecting Office 365 Users connector (see attached.) and using the Org Browser sample app. Adding top:500 to the SearchUsers() function. Same error.

 

No parameter. This function has no optional parameter named 'top'.

Community Support Team
Community Support Team

Re: Office365Users.SearchUser only returning limited results

Hi @simon-int ,

Which Office 365 license do you have for your Office 365 account?

Are you a Global Administrator within your Office 365 tenant?

 

Currently, I could not reproduce your issue on my side (On my side, I own Office 365 E5 license for my Office 365 account). Please consider ask your Administrator to assign Global Administrator Role to you within your Office 365 Admin Center, then go to your app, re-create a new conection to the Office 365 Users connector, check if the issue is solved.

 

If the issue still exists, please submit an assisted supported ticket through the following link:

https://powerapps.microsoft.com/en-us/support/pro

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

I have Office 365 E3 and Microsoft PowerApps Plan 2 Trial

 

I'm not a Global Administrator.

Community Support Team
Community Support Team

Re: Office365Users.SearchUser only returning limited results

Hi @simon-int ,

Yeah, please consider ask your Office 365 Administrator to assign a Global Administrator role to you within Office 365 Admin Center, then try the above formula again, check if the issue has been solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

I tried the same formula logged in as a Global Administrator and it did not work. Same error.

simon-int
Level: Powered On

Re: Office365Users.SearchUser only returning limited results

To resolve this error when using top:999

 

I added another Office 365 Users Data Connector and removed the first one. For some reason, it works fine now.