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

Community site session details

Session Id :
Power Automate - Building Flows
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. 

I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Compare Form Responder against an Office 365 Group

    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
    Re: Compare Form Responder against an Office 365 Group

    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

  • ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Compare Form Responder against an Office 365 Group

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard