The Right Way to Filter SharePoint Person Column in Power Automate - Best Techniques

Power Automate Filter Query With Person Column From SharePoint Online

No comments

Loading

In this “Power Automate Filter Query With Person Column” article, we will learn what the best way is to filter Person Column Email ID from SharePoint Online List while querying the list items using the Power Automate Get Items action. Here, I have used the “Get My Profile V2” and “Get Items” actions. Already, I have written an article on how to work with the “Get Items” action in Power Automate flow. Now, before I dive into more on this, I will a little bit explain about the “Get My Profile V2” action.

Power Automate Filter Query With Person Column From SharePoint Online

Before I take you to the flow action, let’s have a fair understanding of the “Get My Profile” action.

What is “Get my profile (V2)” action in Power Automate?

The “Get My Profile (V2)” action in Power Automate is used to retrieve the profile information of the user who is currently executing the flow. This action comes from the Microsoft Graph API and is part of the Office 365 Users connector. It allows you to get detailed information about the user, such as:

  • Full name
  • Email address
  • Job title
  • Phone numbers
  • Department
  • Manager
  • Office location

Key Use Cases:

  1. Personalized Workflows: Automate tasks based on the user’s identity, such as sending personalized emails or filtering data relevant to the logged-in user.
  2. Approval Workflows: Retrieve user details for approval processes or routing tasks based on department, manager, or job title.
  3. Dynamic User Information: Use the profile data dynamically in workflows for reports, task assignments, or documentation.

This action is especially useful when you need to identify or work with the user running the flow without having to manually input their details.

Get Person column email ID Using Power Automate Flow

Step 1: Person column in SharePoint Online list.

This is the employee name person column in my SharePoint Online list.

Person Column in SharePoint Online list
Person Column in SharePoint Online list

If we query the above list using the Power Automate “Get Items” action, we will get the below output where we can see that the “Email” is the property to extract an employee’s email from the Employee Name column.

Power Automate Get Items Output
Power Automate Get Items Output

But if we pass the same thing in the “Get Items” filter query, it does not work. We’ll get the following error:

“One or more field types are not installed properly. Go to the list settings page to delete these fields.
clientRequestId: 054de44e-3e8b-4506-8f69-d090da4c3a71
serviceRequestId: bf9757a1-d016-6000-97f1-1333f317434b”

Flow run failed in Power Automate
Flow run failed in Power Automate

Then, if we see the output of “Get my profile (V2),”  there we can see “mail” is the property to extract email id from my profile action, but if we pass the same to the “Get Items” filter query, this also does not work and gives the same above errors. So, these errors are not true.

Power Automate Get my profile v2 Output
Power Automate Get my profile v2 Output

What is the right query to filter the person column based on the email ID?

Below is the right query to filter the SharePoint Online Person column based on the logged-in user email ID.

Power Automate Filter Query With Person Column From SharePoint Online
Power Automate Filter Query With Person Column From SharePoint Online

In the above query, “EmployeeName” is the person type column in my SharePoint Online list.

Notice that in the above “EMail,”  “M” is in capital letters. I still don’t know what the capital letter “M” is doing here; if we pass this in lowercase “m,”  this query does not work and gives a bad request error.

The technique I am sharing here, I didn’t get from Google or any forums; this is completely from my personal experiences and research.

Let’s run this flow; this time it will run successfully.

Flow ran successfully in Power Automate
Flow ran successfully in Power Automate

Summary

Thus, in this blog, we have learnt how to filter SharePoint Online list items based on the logged-in user email ID using Power Automate “Get my profile V2” and “Get Items” actions dynamically. This technique you can use in your flow to get logged user profile details from the SharePoint Employee Management list or any other list.

And also, we have learnt how to fix the error ” One or more field types are not installed properly. Go to the list settings page to delete these fields”.

 

About Post Author

Do you have a better solution or question on this topic? Please leave a comment