cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sean-PA2Rescue
Frequent Visitor

Is there a problem with using Office365Users.SearchUserV2()?

I've been banging my head against a wall here and I could use some help.

I have a canvas powerapp connected to a SPO list.

On the edit/new form screen one of the fields(Named: AssignedTo) is a simple text input. In the datacard for that field (AssignedTo), I have a combobox and the datasource for it is Office365Users.SearchUserV2.  I have always been told to used the latest and when I look at the documentation for it , Microsoft says to use it instead of Office365Users.SearchUser as this has been deprecated. When i change the datasource to be Office365Users.SearchUser, the combobox works to the point that it will show the list of users. See image below

 

Office365Users.SearchUserComboBox.png

 

So why doesn't this work: 

 

Office365Users.SearchUserV2ComboBox.png

 

Is this a bug?

 

Also, and this a totally different problem and maybe this is an ongoing problem or quirk or something, but when I try and change  the DEFAULT option for the combo box to Parent.Default , I get an error. Is this a limitation of a combobox that it can't have the default be the Parent.Default? Is there a workaround? I'll see if I can create a variable and use that as the default, I don't know what else to do. Any suggestions and help with what seems to be a bug with Office365Users.SearchUserV2 would be much appreciated.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Sean-PA2Rescue :

Are you confused that you can use "Office365Users.SearchUser({top:15})" normally but can not use "Office365Users.SearchUserV2({top:15})"?

Firstly,let me explain why you encounted this problem.

The key is that the structure of the return value of these two functions is different.

Seart for users returns an arror of users.

Seart for users(V2) returns  EntityListResponse.

Secondly,I suggset you try this code:

 

Office365Users.SearchUserV2({top:15}).value

 

24.gif

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @Sean-PA2Rescue :

Are you confused that you can use "Office365Users.SearchUser({top:15})" normally but can not use "Office365Users.SearchUserV2({top:15})"?

Firstly,let me explain why you encounted this problem.

The key is that the structure of the return value of these two functions is different.

Seart for users returns an arror of users.

Seart for users(V2) returns  EntityListResponse.

Secondly,I suggset you try this code:

 

Office365Users.SearchUserV2({top:15}).value

 

24.gif

Best Regards,

Bof

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,181)