web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter SharePoint List...
Power Automate
Answered

Filter SharePoint List view using [ME] and Entra ID

(2) ShareShare
ReportReport
Posted on by 7
 I have a SharePoint list with a column [staffID]. I would like to create a filtered view of the list where staff could only see the items pertaining to them.
 
Known information
  • To filter the view using [me] the list must have a 'Person or Group' column to be used as the filter condition
  • The 'Person or Group' only retrieved user name or email, it does not search by Entra's 'employeeId' (I assume 'employeeId' is not indexed)
  • The column [staffID] matches the field [employeeId] in MS Entra. 
 
Failed attempts
  • Tried creating a Power Automate flow that fetched the list/[staffID], compares it to Entra/[employeeId] and return the email in a new 'Person or Group' column in the list
    • The get items for both retrieves the correct information but when I try 'For Each' [staffID] patch email from matching [employeeId] i get a null response
  • Tried creating a PowerAutomate with an array that compares the values of [staffID] and [employeeId] stored in a separate list and when match update the email but I get a 'bad request' error
 
Any suggestions on how to achieve this? I don't oppose to having a secondary list that I'll keep [staffID] and emails if that would make it easier.
 
Cheers,
 
Daniel
Categories:
I have the same question (0)
  • Verified answer
    Jon Unzueta Profile Picture
    1,827 Super User 2025 Season 2 on at
     

    You're tackling a tricky but solvable challenge — filtering SharePoint list items by a user's employeeId (from Microsoft Entra ID) when the list only has a custom [staffID] column and not a Person or Group column.

    Since [Me] filters only work with Person or Group columns, and employeeId isn't directly searchable in SharePoint views, here's a structured approach to achieve your goal:


    ✅ Recommended Solution: Use a Secondary Mapping List + Power Automate

    Step 1: Create a Mapping List

    Create a new SharePoint list called something like Staff Directory with columns:

    • staffID (Text)
    • User (Person or Group)

    This list will act as a lookup between employeeId and the actual SharePoint user object.


    Step 2: Build a Power Automate Flow to Populate the Person Column

    Trigger: Scheduled or manual

    Steps:

    1. Get items from your main list (with staffID).
    2. Get users from Microsoft Entra ID using the Get user action (Graph API or Entra connector).
      • Filter by employeeId matching staffID.
    3. Update the Staff Directory list:
      • Use Update item or Patch to set the User column with the resolved email/user object.

    ✅ This will populate the Person or Group column with the correct user, allowing you to use [Me] filters in views.


    Step 3: Use a Filtered View in the Main List

    Once the mapping is complete:

    • Add a Person or Group column to your main list (e.g., AssignedUser).
    • Use Power Automate to copy the User from the Staff Directory to this column based on staffID.

    Then create a view with the filter:

    AssignedUser is equal to [Me]

    ⚠️ Common Pitfalls

    • Ensure the Person or Group column is set to allow single selection.
    • Make sure the flow uses the correct format for updating the Person or Group field (usually an object with Claims, Email, DisplayName, etc.).
    • If you're getting null or bad request, double-check the format of the update payload.

     

    🏷️ Tag me if you have any further questions or if the issue persists.
    ✅ Click "Accept as Solution" if my post helped resolve your issue—it helps others facing similar problems.
    ❤️ Give it a Like if you found the approach useful in any way.
  • DB-21031942-0 Profile Picture
    7 on at
    Hi Jon, I appreciate your answer. That does seem to resolve my issue. Thank you for sharing the knowledge!
     
    Cheers,
     
    Daniel

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard