Yesterday, I implemented a client task: how to avoid saving duplicate employee names in the SharePoint list through Power Apps.
In that case, I was required first to check whether the user existed in the organization through a Power Apps connector called Office365Users. If the user/employee name exists in the Office 365 users, it will appear in the Combo box; otherwise, it won’t.
In this article, I will explain how to check if a user exists in organization through Power Apps Office 365 Users. Also, we will discuss how to check if a user exists from a SharePoint list person field using Power Apps.
Check If A User Exists In Organization Through Power Apps Office 365 Users
Maybe you are wondering about it after seeing the screenshot below! Yes, it’s the correct picture only.
Here, there is a Power Apps Text input control and a Button. When the user provides any Employee Email address (from Office 365) and taps on the CHECK button, it will return a true or false value based on the user’s existence.
In Power Apps Office 365 Users, to check whether a user exists, it returns a boolean value of “true” if the user doesn’t exist and “false” if the user does.

1. Add a Text input and a Button control in the app to achieve this. Now, create a variable on the Button’s OnSelect property as: [Also, you can provide the code below either the App’s OnStart or the Screen’s OnVisible property]
Set(
varValidUser,
IsEmpty(Office365Users.SearchUser({searchTerm: txtEmployeeEmail.Text}))
);
Where,
- varValidUser = Variable Name
- txtEmployeeEmail = Text input control name
NOTE:
Ensure to add the Power Apps Office365Users connector to the app before applying the above code to avoid any errors.

2. Insert a Label control and place it at the top of the text input box. Provide the variable name on its Text property as:
"User Exists - " & varValidUser

3. Save, publish, and preview the app. In the text box, enter any Employee Email ID (from Office 365) and click CHECK. Depending on the employee’s existence, the app will return either a true or a false value. If it returns false, then the user exists; if it returns true, then the user does not exist.
Power Apps Check If A User Exists In A SharePoint List Person Field
Next, let’s discuss how to use Power Apps to check if a user exists in a SharePoint Person field.
1. I have a SharePoint list named Employee Survey Form, with all the fields below and a Person field.
| Column | Data type |
|---|---|
| Employee Full Name | Person |
| Employee Email | Single line of text |
| Contact Number | Number |
| Current Location | Choice [Australia, Brazil, Canada] |
| Age | Number |
Refer to the image below.

2. In Power Apps, an Edit form is connected to this SharePoint list. The form contains the Employee Full Name (Combo box control) and all the active users from the Office 365 account.
When a user selects an employee name from the Combo box, it checks whether the selected employee is present in the SharePoint list. If it does, the Power Apps form will not be submitted. If the employee chosen from the combo box does not exist, the survey form will be allowed to be submitted.
Have a look at the GIF below:

3. First, select the Employee Full Name Combo box Data card value and apply the formula below on its Items property:
Filter(
Office365Users.SearchUser(
{
searchTerm: DataCardValue12.SearchText,
top: 999
}
),
AccountEnabled = true
)
Where,
DataCardValue12 = Employee Full Name Combo Box Data Card Name
The above code helps filter and search all the top 999 users from the Office 365 account and displays only the active users.

4. To check whether the combo box selected employee name exists or not, copy and paste the code below on the SAVE Button’s OnSelect property:
If(
CountRows(
Filter(
colEmployeeSurveys,
'Employee Full Name'.DisplayName in DataCardValue12.Selected.DisplayName
)
) > 0,
Notify(
"Please Select Other Employee Name, Your Selected Name Already Existed in List",
NotificationType.Error
),
SubmitForm(Form3);
Notify(
"Your Survey Has Been Submitted Successfully",
NotificationType.Success
);
ResetForm(Form3)
)
Where,
- CountRows = This function helps to count the total number of items from the collection
- colEmployeeSurveys = Power Apps Collection Name that contains all the data from the existing SharePoint list
- ‘Employee Full Name’ = SharePoint Person Field
- DataCardValue12 = Employee Full Name Combo box Data Card Name
- Form3 = Edit Form Name

5. Finally, save, publish, and preview the app. Try to enter the details or the employee’s full name that already exists in the SharePoint list.
Once you tap the SAVE button, an error notification will appear in the top left corner, as shown below. The message says, “Please Select Other Employee Name, Your Selected Name Already Existed in List.”

These are the two examples to check if a user exists in an organization with Power Apps. Such as;
- Check if an employee exists through Power Apps Office 365 Users
- Check if a user exists in a SharePoint Person column using Power Apps
I hope this article found helpful.
Additionally, you may like some more Power Apps tutorials:
- Employee Satisfaction Survey Power Apps App
- Check If A User Is Part Of An Office 365 Group In Power Apps
- Get Current User Details in Power Apps
- Show User Profile Pictures From Email in Power Apps
- Display a User Photo or Initials in Power Apps
- Sort Power Apps Data Table Based On SharePoint Choice Column
- Switch Light Or Dark Theme Color Using Power Apps Toggle Control

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.