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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare Form Responder...
Power Automate
Answered

Compare Form Responder against an Office 365 Group

(0) ShareShare
ReportReport
Posted on by 44

We have a couple of HR Microsoft Forms requiring 3 levels of approval by the HR, the Executive Manager (we have 10 different executives and depending on the team, the executive who approves change) and the CEO. The team leader submits most forms and follows the 3 levels.

 

However, the Executive Manager or the CEO can occasionally submit the form. In these cases, is there a way to check the responder against the Executive Management Office 365 group, and if so, make it go straight to HR and avoid Executive Managers/CEO having to approve the forms they submitted? 

 

For now, the executive manager who approves is chosen from the drop-down menu in the form and using flow, I capture and store who approves in a SharePoint list. 

 

Any help would be greatly appreciated. 

Categories:
  • Verified answer
    Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @JibblyGibbly 

     

    In the flow, add "List group members" action to get the members of m365 group. Pass the group id as input. You can get the Id of the group from the azure portal or ask from the admin:

    ManishSolanki_0-1697086038818.png

     

    Next, add "Filter array" action, write a query to filter records based on respondent email:

    ManishSolanki_1-1697086166490.png

    To enter the filter query, click on "Edit in advanced mode" button present on the bottom and write the below query in the textbox:

    @equals(item()?['mail'], outputs('Get_response_details')?['body/responder'])

     

    Now, check the length of the filter array returned by "Filter array" action. If it has a record or length is greater than zero that means the respondent is a part of m365 group so, add the action in "Yes" block accordingly. If it does not, then flow will move to "No" block:

    ManishSolanki_2-1697086447213.png

    To get the length of array, we need to write the below expression in the expression box as highlighted in the above screenshot:

    length(body('Filter_array'))

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • alex_esdc Profile Picture
    2 on at

    Hey! Not OP, but I tried this solution and it failed to find a user (in the Filter Array action) that was already in the M365 group. Is there a limit to the number of users being retrieved? Our group currently has more than 1k members

  • Manish Solanki Profile Picture
    15,169 Moderator on at

    Hi @alex_esdc 

     

    By default, it returns 1000 items, but you could increase this limit by turn on the pagination in the settings. 

    Click ellipses(...) & select "Settings" from sub menu:

    ManishSolanki_0-1700303964065.png

    Now, turn on the "Pagination" & set the threshold limit as per your need:

    ManishSolanki_1-1700304046271.png

    Press "Done" to save the changes.

     

    Pls retest the flow after increasing the pagination limit.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 414

#2
11manish Profile Picture

11manish 331 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard