Did you need to connect the Power Apps Combo box control to Office 365 users? If so, no worries!
In this Power Apps tutorial, I will explain the “Power Apps Combo box search Office365Users”.
Moreover, I will show you how to exclude guest users from the Power Apps combo box control with Office365Users, and we will also see:
- How to filter the Power Apps combo box with Office365Users
- Power Apps combo box with Office365Users default
- Create a Power Apps collection using people picker
Power Apps Combo box with Office 365 Users
This section will show you how to use a Power Apps combo box to search Office 365 users.
Example,
I created a Power Apps Canvas app and then 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
Here, 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.

As per the screenshot below, the Power Apps combo box will also display the guest users.

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
Here, let me show you we can 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 to avoid the guest users.

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
Here, I will show you how to filter the Power Apps combo box control connected to Office 365 users.
Example,
I created a Power Apps Canvas app and then 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.
Power Apps Combo box with Office365Users default
In this section, I will show you how we can assign a default person value for a Power Apps combo box control.
Default means whenever the user opens the Power Apps app, by default one user will be selected in the combo box control.
Here, I am showing two different scenarios like by assigning the Power Apps combo box default value as the “Current user” and a “Manager“.

Follow the below steps to achieve it:
For Current User
- On the Power Apps screen, insert a Combo box control -> Set its combo box properties to:
Items = Office365Users.SearchUser({searchTerm:cmb_Office365Users.SearchText})
DefaultSelectedItems = Office365Users.SearchUser({searchTerm: User().Email})
Where,
- cmb_Office365Users = Combo box control name

- Save, Publish, and close the app. Then, reopen and preview the app. By default, the combo box control value will be selected as the current user name, as shown below:

This is how to set the Power Apps combo box Office365Users default user value as the current user.
For Manager
- Insert a Combo box control -> Set its combo box properties to:
Items = Office365Users.SearchUser({searchTerm:cmb_Office365Users.SearchText})
DefaultSelectedItems = Office365Users.Manager(User().Email)

- Save, Publish, and close the app. Then, reopen and preview the app. By default, the combo box control value will be selected as the manager name, as shown below:

This is how to set a Power Apps combo box default value with Office 365 users.
Create a Power Apps collection using people picker
Here, I will show you how to create a Power Apps collection using a combo box people picker.
Example,
I have created a Power Apps Canvas app and then added a Combo box control and Data table. Later, I connected the combo box to Office365Users and created a collection to display their email and departments.
Whenever the user selects the user from a combo box, that will create a collection with their email and department. Simultaneously, that will be presented in the data table.

Follow the below steps to achieve it:
- On the Power Apps screen, insert a Combo box control -> Set its combo box properties to:
Items = Office365Users.SearchUser({searchTerm: cmb_UserCollection.SearchText})
OnChange = Collect(
collectUsers,
{
Name: cmb_UserCollection.Selected.DisplayName,
Email: cmb_UserCollection.Selected.Mail,
JobTitle: cmb_UserCollection.Selected.JobTitle
}
)
Where,
- cmb_UserCollection = Combo box control name
- collectUsers = Provide the collection name

- Insert Data table -> Set its Items property to:
collectUsers
Where,
- collectUsers = Collection name

- Save, publish, and close the app. When a user selects users from a combo box control, the selected users’ departments and emails will create a collection, which will be displayed in the data table.

This is how to create a Power Apps collection using a people picker.
Conclusion
In this Power Apps tutorial, I have explained how to use a Power Apps combo box to search Office 365 users.
Also, I have covered how to exclude guest users from the Power Apps combo box control with Office365Users and how to filter the Power Apps combo box with Office365Users.
Lastly, I have shown you how to assign a default person value for a Power Apps combo box control and how to create a Power Apps collection using a combo box people picker.
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 more than 6 years of experience working with SharePoint and the Power Platform. As a Power Platform expert for Power BI, Power Apps, Power Automate, Power Virtual Agents, and Power Pages, she is currently employed with TSinfo Technologies. She is the author of the book Microsoft Power Platform A Deep Dive. She also made a big technical contribution to SharePointDotNet.com in the form of articles on the Power Platform. She enjoys traveling and spending time with her family in her spare time.