web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Office365Users.SearchU...
Power Apps
Unanswered

Office365Users.SearchUserV2 not returning any results

(0) ShareShare
ReportReport
Posted on by 166

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

 

 

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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.

  • Daved1 Profile Picture
    166 on at

    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 Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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.

  • Daved1 Profile Picture
    166 on at

    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

     

  • Daved1 Profile Picture
    166 on at

    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 Profile Picture
    76,299 Super User 2024 Season 1 on at

    @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
    );

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 226 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 191 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 167

Last 30 days Overall leaderboard