Recently, I got a requirement for a client to display the Office365Users name in the Power Apps Combo box control. Now, let us check how to achieve this!
In this Power Apps tutorial, I will explain the “Power Apps Combo box search Office365Users.”
Moreover, you will learn how to exclude guest users from the Power Apps combo box connected with Office365Users, and we will also learn to filter the Power Apps combo box with Office365Users.
Power Apps Combo box with Office 365 Users
This section will show you how to connect the Power Apps Combo box control with Office 365 users.
Example,
I created a Power Apps Canvas app and added a Combo box control connected to Office365Users.
Whenever the user expands the combo box control, it displays the list of Office365 users as shown below:

To achieve it, follow the below steps:
- Sign in to your Power Apps with your valid Microsoft 365 credentials.
- Create a Power Apps Blank canvas app -> Connect the data source as Office365Users as shown below:

- On the Power Apps screen, insert a Combo box control -> Set its Items property to:
Office365Users.SearchUser({searchTerm: cmb_Office365Users.SearchText})
- Save, Publish, and Preview the app. Now, the combo box control contains the users from Office 365.

If you need to display a department with their name. Follow the below steps:
Show display name and department in a Power Apps combo box control
I will show you how to display the name and their department in the Power Apps combo box control.
- Select the Combo box control -> On the combo box properties pane, click on Edit fields

- Select the layout as Person -> Then choose Primary text as “Display Name” and Secondary text as “Department” as shown below:

- Save, Publish, and Preview the app. When the user expands the combo box control, it displays the user’s name with their department.

The Power Apps combo box will display the guest users, as mentioned in the screenshot below.

To avoid the guest user in the Power Apps combo box control, follow the below steps:
Exclude guest users from the Power Apps combo box with Office365Users
Let me check how to avoid displaying the guest users in the Power Apps combo box control.
Example,
On my Power Apps screen, a Combo box control is connected to an Office365Users.
Whenever the user expands the combo box control, it will display the user name by avoiding the guest user’s name.

To achieve it, follow the below steps:
- Select the Combo control -> Set its Items property to:
Filter(
Office365Users.SearchUser({searchTerm: cmb_Office365Users.SearchText}),
AccountEnabled = true && Not("#EXT#" in UserPrincipalName)
)
- Save, Publish, and Preview the app. Now, the Power Apps combo box control contains the users from Office 365 by avoiding the guest users.

This is how we can exclude the guest users from the Power Apps combo box with Office365Users.
Power Apps Office365Users filter by department
I will show you how to filter the Power Apps combo box control connected to Office 365 users by their department.
Example,
I created a Power Apps Canvas app and added a Combo box control connected to Office365Users.
Next, Whenever the user expands the combo box control, it displays the users who all are in the “Marketing” team, as in the screenshot below:

To achieve it, follow the below steps:
- On the Power Apps screen, insert Combo box control -> Set its Items property to:
Filter(
Office365Users.SearchUser(
{
searchTerm: cmb_UserFilter.SearchText,
top: 0
}
),
Department = "Marketing"
)Where,
- cmb_UserFilter = Combo box control name

- Save, Publish, and Preview the app. Now, the combo box control contains the users from only the marketing team.

This is how to filter the Power Apps combo box control with Office365Users.
Conclusion
I trust this Power Apps tutorial helped you to connect the Power Apps Combo box control with Office 365 users.
Lastly, through our tutorial, you have learned to exclude guest users from the Power Apps combo box connected with Office365Users and how to filter the Power Apps combo box with Office365Users by their departments.
You may also like:
- Reset Combobox in Power Apps
- How to Populate Distinct Values in Power Apps Combo Box?
- Power Apps Combo Box Sort
- Power Apps check if a Combo box is empty

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.