Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Search for Users (V2) returning multiple values

(1) ShareShare
ReportReport
Posted on by 36
In my company we have two users with similar names & email addresses. One is Ashley May (amay@) and the other is Ashley Mayeda Welsh (amayeda@). The data is being pulled from a form in which Ashley May is part of a drop-down list of names. The last function of the flow is to send an email to the person indicated in the form - but both of the people listed above are getting emails. How do I limit what the search returns to the exact name instead of any name that happens to contain the search string? 
 
Thanks! 
  • garyrlane Profile Picture
    36 on at
    Search for Users (V2) returning multiple values
    the dynamic key option seems perfect for this situation, will give it a go! 
  • creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Search for Users (V2) returning multiple values
    Since you need to use the Search for Users (V2) action, you would have to use a Filter Array action to filter out the results returned from the Search for Users (V2) action.
     
    If your drop down contains the display name of the user, insert the Display Name dynamic content from the Search for Users action in the first value field. and the is equal to operator. The is equal to operator looks for an exact match
     
    In the second value field, insert the dynamic content from the Get Response Details action. 
     
     
    To learn more about how to use the Filter Array action, please refer to this YT Tutorial: Are you using the Microsoft Power Automate Filter Array Action wrong?

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
    1️⃣ Cross-Referencing Data
    2️⃣ Filtering by Key
    3️⃣ Substring Matching

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

    IN THIS VIDEO:
    ✅ 3 Ways to Use the Filter Array Action
    ✅ How to use the Scope Action to Group Actions
    ✅ How to Check the Number of Items returned from a Filter Array Action
    ✅ How to Cross-Reference Data in Excel with a SharePoint List
    ✅ How the Filter Array Action Works
    ✅ How to Access the Dynamic Content from a Filter Array Action
    ✅ How to Filter Items by a Key
    ✅ How to Filter Items by Matching a Substring
    ✅ How to Use Multiple Conditions in a Filter Array Action

    ---

    You can also add a condition check to check the number of items returned from the Filter Array action. The Filter Array action will return an array of items even if it's a single item. To avoid the Apply to Each action, you'll need to use an expression. I cover how to do that in the YT Tutorial linked below.


    In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:
    1️⃣ Looping through a Single Item
    2️⃣ Creating Unnecessary Nested Loops
    3️⃣ Looping through an Unfiltered Array

    At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

    IN THIS VIDEO:
    ✅ How to avoid the Apply to Each action with a single item array
    ✅ How to use the item() function to access dynamic content in an array
    ✅ How to prevent unnecessary nested Apply to Each action loops
    ✅ How to use the Select action
    ✅ How to convert an array to a string with the Select action
    ✅How to use the Filter Query field
    ✅ How to count the number of items in an array
    ✅ How to use a condition control
    ✅ How to use the concurrency control
    ✅ How to set a top count
    ✅ How to use Compose actions for troubleshooting
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Search for Users (V2) returning multiple values
    If your selections are in a drop-down list, you can create a dynamic key to output a specific email address (or email addresses) based on a selection. I cover how to do that in this section of my YT Tutorial: How to Get Microsoft Form File Uploads Attached to an Email 📧
     
    In this Microsoft Power Automate Tutorial I’m going to cover where file uploads from your Microsoft Forms are saved. I’ll also show you how attach the uploaded files to an email and how to dynamically name the files and customize the recipient of the email based on the selections made in your Microsoft Form. I will also cover how to handle responses that don’t include any file uploads.

    I’m not going to cover how to get the values from your form since I've already covered that in a different tutorial:    • How to Get a Microsoft Form RSVP Resp...  
    In an upcoming tutorial I’ll show you how you can apply this same logic to save your file uploads into a specific folder on SharePoint, how to add metadata to those files and how to add the file uploads to a SharePoint list.
     
    IN THIS VIDEO:
    ✅ Two types of MS Forms
    ✅ Where Microsoft Personal (OneDrive) Form File Uploads are Saved
    ✅ Where Microsoft Group Form File Uploads are Saved
    ✅ How to Add a File Upload Question to an MS Form
    ✅ How to get a Microsoft Form ID
    ✅ How to get a Microsoft Form Response
    ✅ How to Get the Dynamic Content Microsoft Form File Upload Content
    ✅ How to handle Single and Multiple Microsoft Form File Uploads
    ✅ How to use a Scope action to Organize and Group Your Flow Actions
    ✅ How to Get the File Content from an MS Form File Upload
    ✅ How to Collect All Files Uploaded to a MS Form and Attach to an Email
    ✅ How to Handle MS Form Response When a File Isn’t Uploaded
    ✅ How to Create an Email Key
    ✅ How to Send an Email to a Specific Recipient Based on Form Selection
    ✅ How to Create a Dynamic Output Based on Form Selection
     
     
    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • garyrlane Profile Picture
    36 on at
    Search for Users (V2) returning multiple values
    Sadly, that doesn't work in this situation... I am not receiving the email address from the form data - otherwise i don't think this would be an issue. I thought perhaps that putting the name in quotes might solve it (like one would do on a google search to restrict to the exact value) but that returned an error. 
  • creativeopinion Profile Picture
    10,450 Super User 2025 Season 1 on at
    Search for Users (V2) returning multiple values
    Use the Get user profile (V2) action instead. In the User (UPN) field, insert the full email address. This action will return a single user profile.
     


    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1

Featured topics

Restore a deleted flow