How to Get Email Address From Name in Power Automate?

One of my colleagues recently needed to retrieve email addresses from user names in Power Automate. The task involved automating notifications where only user names were available in a SharePoint list.

My colleague could extract the corresponding email addresses using the “Office 365 Users” connector and the “Search for users” action. This approach ensured the correct recipients received the automated notifications, enhancing the flow’s efficiency.

In this tutorial, I will explain how to get email address from name in Power Automate. Also, we will see how to get your current username and email address in Power Automate.

Get Email Address From Name in Power Automate

Now, I will tell you how to get an email address using Power Automate from a name. To do this, follow the below steps:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

power automate get email address from name

2. Add the Search for users (V2) action and select the Search Term from the advanced parameters. Then, inside the Search Term box, provide a name.

power automate get user email from display name

When you run the flow, you can find the email by searching for users. I added a ‘Send an email‘ action for testing purposes with the required parameters. When you try to add an email from the search for user action, I will automatically add a for each loop.

power automate get email from name

Now, click Save and run the flow manually. Once it runs successfully, check the person’s email.

Get Email Address From Name in Power Automate

How to Get Current Username and Email Address in Power Automate?

Suppose you want to build an internal leave request approval flow. When an employee submits a leave request, you want to automatically capture their username and email address to include it in the request form without requiring them to enter this information manually.

Now follow the below steps:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

power automate get current user email

2. Add the Get my profile (V2) action. This will retrieve all information about the current user.

power automate get user email

To check this, add a compose action and put the below inputs:

Display Name: @{outputs('Get_my_profile_(V2)')?['body/displayName']}
Email: @{outputs('Get_my_profile_(V2)')?['body/mail']}
power automate get name from email

Now, click Save and run the flow manually. Once it runs successfully, click the Compose action to see the current user username and email address.

How to Get Current Username and Email Address in Power Automate

How to Get a user Profile from Email using Power Automate?

To get a user profile from an email address using Power Automate, you can use the “Get user profile (V2)” action. This action fetches user information, such as the user’s display name, job title, email, and more, from Azure Active Directory based on the email address provided.

Now follow the below steps:

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

power automate get current user email

2. Now, we need to get the user profile from the email address, so select the Get user profile(V2) action. Then, in User (UPN), add the User Email.

How to Get a user Profile from Email using Power Automate

Now, click Save and run the flow manually. Once it runs successfully, click the Get user profile action to see the user Profile.

Get a user Profile from Email using Power Automate

How to Get a User Principal ID using Power Automate?

For this example, I created a SharePoint list called Issue Tracker.

power automate get user profile from email

When we create an item in the SharePoint list, it generates an ID, which we use as the user principal ID.

To do this, follow the below steps:

1. Create an automated cloud flow. Give the flow name and select the trigger When an item is created. Also, provide the Site Address and List Name.

get email power automate

2. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint site where you want the list to be created
  • Method: Select “GET” as the method
  • URI: Provide the below URI:
_api/web/SiteUsers/getByEmail('domain.onmicrosoft.com')
power automate get display name from email

3. Then add an Initialize variable action Then provide the variable name, type it as a string, and in value, write the below expression:

body('Send_an_HTTP_request_to_SharePoint')['d']['id']
Get a User Principal ID using Power Automate

Now click on Save and run the Flow manually. Once the flow runs, add an item to the SharePoint list.

How to Get a User Principal ID using Power Automate

After the flow runs successfully, click the Initialize variable and you will see the User Principal ID.

How to Get a User Principal ID in Power Automate

In this tutorial, I explained how to use Power Automate to retrieve email addresses from user names with the “Office 365 Users” connector, enabling automated notifications. Additionally, I showed how to capture the current user’s username and email address using the “Get my profile” action, simplifying the process of automatically collecting and using user data in workflows.

Related Power Automate tutorials:

  • Hi Bijay,

    Very interesting and helpful article for a beginner like me, thank you for sharing your knowledge here.

    I’m hoping you can assist with a flow I’ve been having some trouble with. I am trying to obtain a user’s email address by specifying their job title, I tried using the Search for users (V2) action with the following Search term but it is not working:

    LookUp(Office365Users.SearchUserV2({searchTerm:””}).value, JobTitle=”CEO”).Email

    Any guidance you can offer is greatly appreciated.

  • >

    Build a High-Performance Project Management Site in SharePoint Online

    User registration Power Apps canvas app

    DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

    Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

    Power Platform Tutorial FREE PDF Download

    FREE Power Platform Tutorial PDF

    Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…