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

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,723)