cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Daved1
Helper II
Helper II

Office365Users.SearchUserV2 not returning any results

So i have a solution with 2 Apps.  I added the following to a button OnSelect in 2 Canvas Apps,

 

ClearCollect( colUsers3, Office365Users.SearchUserV2({top: 999}).value );

 

Both using the same connection reference to Office365Users.  

 

In one app it works fine and returns the expected Users.

 

The other app returns no users (not working)

 

Why ??  Any ideas - this is driving me crazy.  I have no errors in either app, i have tried removing and re-adding the data source (Office365Users).  I cannot get this to work in one app, but works fine in the other.   I am at a loss..

 

Thanks

 

 

6 REPLIES 6
RandyHayes
Super User
Super User

@Daved1 

Check your features in the app that are enabled, comparing the working to the non-working to see if you have any feature that might be impacting the results.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks for the idea.  I did not think of this.  I went thru and made sure all the upcoming features, preview, experimental and retired mathced.  I made sure they all matched, I save, published, close the app, refreshed the browser, re-opened, but the problem persists.

 

I think it has something to do with the connection, but i have tried to remove and re-add it.  Yet still does not work in 1 app , but works fine in the other...

 

 

RandyHayes
Super User
Super User

@Daved1 

Same environment?  Same connector?

If so, then you might try to use the Monitor Tool to see if you can discover anything from that.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Same environment, same connector (I think)

Another good suggestion...

 

Result from working app

Daved1_1-1660665019343.png

 

Result from non working app

Daved1_0-1660664948125.png

 

This is very strange

 

This does not return any records

ClearCollect(colUsers3,
Office365Users.SearchUserV2({top: 999}).value
);

 

This works and returns the expected records

ClearCollect(colUsers5,
Office365Users.SearchUser({top: 999})
);

 

So i don't think its the connection.  It must be something in the solution.  I tried to create a new app and only added a button to load the collection

 

ClearCollect(colUsers3,
Office365Users.SearchUserV2({top: 999}).value
);

 

and it did not work

RandyHayes
Super User
Super User

@Daved1 

The SearchUserV2 action will not return results (by default) if no search term is provided.  In order to return results without a search term, you need to tell it isSearchTermRequired false.

So, your formula would be:

ClearCollect(colUsers3,
    Office365Users.SearchUserV2({top: 999, isSearchTermRequired:false}).value
);

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,187)