Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Scan email address from email body and send email to that address

So, we are a small University, we use Office 365 synced with our directory with Azure Ad Sync, password reset is not free for our plan so I am looking for an alternative to let users reset their own password. We actually already have a website to do that, but what  I would want to do is: (Based on how it work right know)

1. A person click on "Forgot Password" Link

2. The that person is asked for their email

3. If it is right, and emal is sent to the tenant admin with the email of that person

4. On our Active directory we have an attribute where we store a personal email of each user

5. Administrator right know, search for that users email, and manually send that person an email with the link to reset password


So I would like to know if it is possible using Flow, or other software to:

1. Scan text (The email of the person who doenst remember the password) inside adminisitrators inbox

2. With that email, search active directory for that user and get the personal email

3. Send to the personal email a link to reset the password



Sorry for my english, hope this is possible



Community Support Team
Community Support Team

Re: Scan email address from email body and send email to that address

Hi @ buitro,


Could you please share more details about the email body of the adminisitrators inbox email?


I have made a test to get the email address inside the body of an email as below:



You could create the flow as below:

  1. Add a trigger “When a new email arrives”.
  2. Add a Compose, choose the “Body dynamic” content of the trigger in the input field.
  3. Add a compose 2, the expression of the compose 2 as below:



4.Add a compose 3, the expression of the compose 3 as below:



5.Add a compose 4, rename the Compose 4 to “email address”, the expression of the “email address” as below:




Could you please explain more about the attribute that you mentioned and have stored the personal email of each user? I have made a test and don’t find a field could save the personal email in the Azure Active directory, have you save the personal email in another field in Azure Active directory, for example you have saved the personal email in the “Mobile Phone” field ?


If you have saved the personal email in a field of Azure Active directory,


You could add a “Get user” action of Azure Active directory connector, choose the output dynamic content of the “email address” in the User Id or Principle Name field. Then you could add an action “Send an email”, choose the field’s dynamic content of the Azure Active directory that you save the personal email in the “To” field of action “Send an email”, fill in the link that could reset password in the “Body”field, and set the “Is HTML” field to “Yes”.



Alice Zhang

Level: Powered On

Re: Scan email address from email body and send email to that address

Hi, thank you for your answer, let me explain me better, and simplify it:


1. A user forget the password so he click on the "Forget Password" link

2. He is presented a form that says enter your email and a button "send"

3.He enter his email an click "send"

4. Administrator of that tenant get an email with the subject: "Request to reset the Microsoft Online Services password for

5. Thats it.


So what I want is

1. Scan the subject text for the variable email, in this case (

2. Match that email to Active Directory User, or as you proposed to Azure Active Directory User

3. Once it find the user, search for the user attribute "otherMailbox"

4. Write a Message with a custom link to the email extracted from "otherMailbox" attribute



Hope I explained better



Thank you again

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020


Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!


Australia Summit

Travel to Melbourne and network with thousands of peers!


Microsoft Learn

Learn how to build the business apps that you need


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 75 members 4,048 guests
Please welcome our newest community members: