Would you like to learn how to use Office 365 users in the Power Apps combo box control? If so, this Power Apps guide will assist you in achieving your answer.
So, in this Power Apps Tutorial, we’ll go over how to use Office 365 users within the Power Apps Combo control in a number of situations. Examples include:
- Power Apps combo box with Office 365 users
- Power Apps combo box Office 365 users allow search
- Power Apps combo box Office 365 users allow multiple
- Power Apps combo box Office 365 users picture
- Power Apps combo box Office 365 users display email
- Power Apps combo box Office 365 users filter
- Power Apps combo box default selected items Office 365 users
- Power Apps Office 365 users.search user combo box
- Power Apps combo box Office 365 Users into the people picker
- Power Apps combo box Office365Users selected item
- Power Apps combo box Office 365 users with job title
Before working with Office 365 users within the Power Apps combo box control, we must connect the Office365Users connector to the Power Apps. The following steps are:
- Build a blank canvas app on the Power Apps environment. It will open with a default screen i.e., Screen1.
- Then connect the Office365Users connector to the canvas app. On the default screen, navigate to the ‘Add data’.
- Search Office365Users in the search bar and select the connector. It will appear in the Add data section.
Next, we will see how to use this connector within the Power Apps combo box control based on various types of scenarios.
Power Apps combo box items office 365 users
Here, we will see how to work with Power Apps combo box items for Office 365 users. That is, we will create a Power Apps combo box control that will display all of the Office 365 users in that organization. The following steps are:
- On the Power Apps screen, add a combo box control. Click on Insert > Inputs > Combo box > Select.
- Insert the below expression on the Items property of the combo box control.
Items = Office365Users.SearchUser({searchTerm:Cmb_Users.SearchText}).DisplayName
Where,
- SearchUser: It retrieves the search user’s profile.
- searchTerm:Cmb_Users.SearchText: It retrieves the search text inside the combo box control.
- Cmb_Users: The name of the combo box control.
Let’s preview this app and expand the check box’s chevron. We can see it will display all the office365 users of the respective organization below:
This is how to display all the Office365 users within the Power Apps combo box control.
Power Apps combo box office 365 users allow search
Sometimes it is weird to scroll and search for a specific user from the whole list. In such a case, the combo box allows us to search the user by their name from the whole list. Here, we will see how to build a Power Apps combo box with Office 365 users that allow searching the users.
By entering text into the Power Apps combo box, we can search for items. On the right side Properties panel, there is a property called Allow searching that we can enable by setting the toggle to true.
Let’s preview the app. Insert any text on the combo box search text box. (Ex- User). We can see it will display all the users whose name contains User like below:
This is how to allow searching on the Power Apps combo box office 365 users.
Power Apps combo box office 365 users allow multiple
In Power Apps combo box control, there is another property named that allows the user to select multiple selections. We can enable this property by using a toggle control or set with a boolean value (i.e., true or false).
To enable this property, select the combo box control and navigate to the Properties panel. There we can find the Allow Multiple Selections property and set the toggle On.
Let’s preview it, and we can see, it allows multiple selections at the same time.
This is how to work with the combo box with Office 365 users that allow multiple users in Power Apps.
Read How to Reset Power Apps Combo Box
Power Apps combo box Office 365 users picture
While working with the Power Apps combo box control, it allows us to display the pictures of the respective Office 365 users within the combo box items.
Recently, we published an article where we mentioned how to display the Office 365 user’s image. So, we refer you to follow that blog to get the solution.
Power Apps combo box office 365 users display email
If there are repeated names, we may become confused when selecting the user name from the Power Apps combo box. In such cases, it will be more helpful if the combo box displays email addresses rather than user names.
In this section, we’ll look at how to display Office 365 users’ emails within the Power Apps combo box control. To do this, the following steps are:
- Add a combo box control to the Power Apps screen.
- Then insert the below expression into the combo box’s Items property.
Items = Office365Users.SearchUser({searchTerm:Cmb_Users.SearchText}).Mail
Where Cmb_Users is the name of the Power Apps combo box control. Once the formula is applied to the combo box control, click on the Alt key + Combo box’s chevron. The como box will display the items below:
This is how to display only the Office 365 user’s emails within the Power Apps combo box control.
Power Apps combo box office 365 users filter
So in this section, we will see how to filter a Power Apps combo box control having Office 365 users as items.
Suppose, we want to build a combo box control using the Office 365 users and that will display only those users whose department is equal to IT. To implement this, the following steps are:
- On the Power Apps screen, add a combo box control.
- Insert the below expression on the combo box’s Items property to display the filtered users based on the specified department.
Items = Filter(Office365Users.SearchUser({searchTerm:Cmb_Users.SearchText,top:0}),Department="IT")
To see the result, expand the above combo box control. As we can see, it will only show users who are part of the IT department.
This is how to display the Office 365 users within the Power Apps combo box control based on filters.
Read Power Apps Cascading Dropdown Control
Power Apps combo box default selected items office 365 users
Here, we will see how to set the default selected items for Office 365 users within the Power Apps combo box control. We have a requirement where we need to display the currently logged-in user as the default selected item in the combo box control.
To work with this requirement, the following steps are:
- We have created a combo box control that contains and displays all the Office 365 users like below:
- From the above list, we will set the currently logged-in user as the default selected items. Insert the below expression directly within the DefaultSelectedItems property of the combo box.
DefaultSelectedItems = {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Email: User().Email,
Claims: "i:0#.f|membership|" & User().Email,
DisplayName: User().FullName
}
or,
You can insert the below expression within the DefaultSelectedItems property of the combo box control.
DefaultSelectedItems = Office365Users.SearchUser({searchTerm: User().FullName})
In both cases, the combo box will display the current user as default selected items like below:
This is how to set Office 365 Users as the default selected items within the Power Apps combo box control.
Power Apps Office365users.searchUser combo box
While working with the Office365Users within the Power Apps combo box, we mostly used an action named SearchUser that is used to retrieve the user profiles that match the search term.
The syntax for this action is:
Office365Users.SearchUser({searchTerm: Text,top:Number},)
Here, the searchTerm and top parameters are both optional. If we only use Office365Users. SearchUser() will then return a list of all Office 365 users from our respective organizations.
Power Apps combo box Office 365 Users into the people picker
Here, we will see how to convert a regular combo box that contains Office 365 users into a people picker. To work with this, the following steps are:
- On the Power Apps screen, add a combo box control and insert the below expression within the Items property to display the users.
Items= Office365Users.SearchUser()
Let’s convert this regular combo box into a people picker. To do this, the following steps are:
- Select the above combo box.
- Navigate the Fields under the Properties panel > Edit.
- Select the Layout under the Data > Person.
- Set the below sub-properties such as:
- Primary text: DisplayName
- Secondary text: Mail
- Search text: Mail
Now, when we preview the app, we can see that the combo has been converted into the People picker, as shown below. It will also display the email address.
This is how to convert the Power Apps combo control Office 365 Users into the people picker.
Read How to Filter Power Apps Dropdown Control
Power Apps combo box Office365Users selected item
Here, we will see how to display the Power Apps combo box Office 365 Users selected item within in a text label.
We are going to use the above example of the Power Apps combo box control. On that screen, we’ll add a text label control to display the email address of the selected user.
Next, add the below expression into the label’s text property:
Text = Concat(Cmb_OfficeUsers.SelectedItems, Mail & ";")
where Cmb_OfficeUsers is the name of the combo box control (on teh bapev example).
Let’s save the app and play it in preview mode. We can see, it will display the selected user’s email on the text label like below.
This is how to display the selected item’s email from the Power Apps combo box using Office 365 Users.
Power Apps combo box Office 365 users with a job title
Apart from displaying email, we can also display the job title of the respective Office 365 Users within the Power Apps Combo box control. To implement this, we are going to use the above example of combo box control that converted to a people picker.
On that combo box control, set the secondary text as Job Title under the Fields properties.
Now, it will display the user’s display name along with the job title like below:
This is how to display the Office 365 User’s job title within the Power Apps combo box control.
Conclusion
This Power Apps Tutorial taught us how to connect Office 365 users to a Power Apps app and how to work with this using a Power Apps combo box control with various scenarios. Examples include:
- Power Apps combo box items Office 365 users
- Power Apps combo box Office 365 users allow search
- Power Apps combo box Office 365 users allow multiple
- Power Apps combo box Office 365 users picture
- Power Apps combo box Office 365 users display email
- Power Apps combo box of Office 365 users filter
- Power Apps combo box default selected items Office 365 users
- Power Apps Office365Users.SearchUser combo box
- Power Apps combo box Office 365 Users into the people picker
- Power Apps combo box Office365Users selected item
- Power Apps combo box Office 365 users with job title
You may also like the following Power Apps tutorials:
- How to Patch Power Apps Combo Box
- How to Sort Combo Box Items in Power Apps
- How to Work With Power Apps Dropdown Blank Values
- How to Remove Duplicates in Power Apps Dropdown
- Power Apps Dropdown Control with SharePoint
- How to Set Default Value in Power Apps Dropdown
- How to use Power Apps Gallery Dropdown
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (9 times). I have also worked in companies like HP, TCS, KPIT, etc.