
This sample shows how to fix the issue where a Power Apps ComboBox connected to a SharePoint "Person" column does not display all users.
By default, SharePoint person columns are limited in search results and may exclude users who haven't accessed the site yet. This solution uses the Office365Users connector to properly search and select any user in your organization, and ensures the selected value is correctly saved back to SharePoint.
// Items property of the ComboBox
Office365Users.SearchUser({SearchTerm: ComboBox1.SearchText})
// DisplayFields
["DisplayName"]
// SearchFields
["DisplayName"]
// IsSearchable
true
// Update property of the DataCardValue (the ComboBox)
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & ComboBox1.Selected.Mail,
DisplayName: ComboBox1.Selected.DisplayName,
Email: ComboBox1.Selected.Mail
}