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 / Finding email address ...
Power Automate
Unanswered

Finding email address based on selected name in Microsoft Form

(0) ShareShare
ReportReport
Posted on by 56

Hi there,

I am a newbie to MS Power Automate so I hope someone can help me. 

I created a Microsoft Form, and one of the questions provided a list of managers for approval. 

I would like to be able to send an email approval to the manager selected from the list. 
I tried the following using Search for User (V2) but it doesn't work. Can someone help? Many thanks in advance.

 

werdnak_0-1594286100421.png

 

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    'and one of the questions provided a list of managers for approval'

    How is this list of managers currently defined in your form? Is it a list of email addresses and the user just picks one, or a list of (first name + sure name), other? Also, did you activated multichoice on the question?

     

    If possible, please share a screenshot from 'Get response details' output so we can clearly see what's inside the response

    Thanx!

  • werdnak Profile Picture
    56 on at

    Hi @efialttes ,

    The list of manager is a drop down list of specified names (e.g. John Doe, Jane Doe). User of the form cannot select multiple names. They can only select one name from the drop down list. 

    I provided the outputs below. I highlighted in yellow the name of the manager (based on the selection of the user).

    Based on the yellow field, how do I get the email address and put that in the Assigned To field in Start and Wait for an Approval.

    Note I also masked the personal information in black.

    Thank you so much. 

     

    werdnak_0-1594289526975.pngwerdnak_1-1594289615540.png

     

  • efialttes Profile Picture
    14,756 on at

    Hi!

    Just to get sure how is Andrew related info currently stored in your Tenant, do you have its email address? If so, create a manual dummy flow and add 'Get user profile v2' assigning Andrew email address as its input and execute it. This way you can inspect the way personal info is structured on your tenant and figure out why 'Search for users' fails

    Hope this makes sense

  • werdnak Profile Picture
    56 on at

    Hi @efialttes ,

     

    There is no issue with Search for Users (V2) function.

     

    The issue that I have is I am not sure how to convert the output from Search for Users (V2) -'UserPrincipalName' and put that into the 'Assigned Field' in Start and Wait for an Approval.  I provided the screen shots (both the flow and outputs from Search for Users (V2)) below if you could assist. Many thanks.

     

    werdnak_1-1594294742071.png

     

    werdnak_2-1594294809582.png

     

  • efialttes Profile Picture
    14,756 on at

    Hi!

    Understood. Two comments:

    1.- 'Search for users v2' output is an array of 0..n elements, I believe when executing 'Search for users' you always expect a single match, right?

    2.- I am assuming the email address is stored under 'Email' property in each 'Search for users v2' output element, if not just try with UserPrincipalName instead

    FLow_SEarchUsers_Approval.png

    Please note on Select action block you need to switch input mode (click on the icon on the right)

    Now, the WDL expressions inside are:

     

    length(body('Search_for_users_(V2)')?['value'])

     

    and

     

    join(body('Select_MatchingEmails'),';')

     

    Hope this helps

  • werdnak Profile Picture
    56 on at

    Hi @efialttes ,

    There is only a single match to the Search for Users (V2). 

    I still have the same problem as before. Following your guidance, I still receive an error message. Let me show you the flow and outputs. Note that our email address is the same value as the User Principal Name. I tried both and it still returns same error. I suspect that the join(body('Select_3'),';') is returning the following output [s.kong@XXX.edu.au] - with bracket. That is why it cannot find the user - but I don't know how to verify this. 😞

     

    Condition 1:  length(body('Search_for_users_(V2)')?['value'])    - No issue here

    Select 3:  - No issue here

    From : Value

    Map: UserPrincipalName: UserPrincipalName

    Start and wait for an approval 2: Issue

    Assigned To: join(body('Select_3'),';')

     

    FlowFlowError OutputError Output

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    @werdnak 

    I would suggest to add a dummy 'Compose' action block just before 'Send an email', assign as its input the join() based expression, reexecute the flow and inspect its outputs. This way you can verify its result

     

    If there is a single email address, then it looks like a provisioning problem on the Azure AD

    Hope this helps

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard