Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Issue regarding getting the email address from distribution list

(0) ShareShare
ReportReport
Posted on by 2

 

Hi,

I have created a flow to get the email address of group members. There are around 20 group members but for 1 member email address is coming wrong. Does anyone know how from where flow picks the email address?

 

Problem is happening only with the flow. When sending the email to that group id it goes to all group members.

 

  • rachit0185 Profile Picture
    2 on at
    Re: Issue regarding getting the email address from distribution list

    Hi,

     

    I have attached the snapshot. It's a very simple flow.

     

    1) Manually Trigger a flow

    2) Action - Office 365 groups - List Group members

    3) Action - Send email - List group members - User's email address.

     

    Now this group has 21 members. Only 1 members email address is coming wrong. I deleted and re-added this particular member in group still email address is coming wrong. But when I sent email from outlook to this group id than there is no problem. It goes to all 21 members. So my doubt is somewhere in the database this particular group member email address is not correctly mentioned but I don't know where should I look.

     

    In Azure active directory I checked as per your steps and email address their in the user profile is showing correct only.

  • v-xida-msft Profile Picture
    on at
    Re: Issue regarding getting the email address from distribution list

    Hi @rachit0185,

     

    Could you please share a screenshot of your flow's configuration?

    Do you want to get the wrong email address from a Distribution list?

     

    I have made a test on my side and please take a try with the following workaround:

    • Add a proper trigger, here I use Flow Button trigger.
    • Add a Variables-> "Initialize variable" action, Name set to WrongEmail, type set to String and Value set to empty.
    • Add a "Get group members" action of Azure AD connector, Group Id field set to the group id (Object Id) of your Distribution list group (e.g. 1d79cbf5-30b3-4262-ba1c-ef389d8418e9, please find the Group Id (Object Id) within your Azure Portal).
    • Add a "Apply to each" action, input parameter set to Group Members dynamic content of the "Get group members" action.
    • Within "Apply to each" action, add a "Send an email" action, To field set to Mail dynamic content of the "Get group members" action. Then configure a Run After action for the "Send an email" action, add a "Set variable" action, Name set to WrongEmail and Value set to Mail dynamic content of the "Get group members" action. Then click "Menu" button-> "Configure run after" option as below:8.JPGThen select "has failed" option within the "Set variable" should run after:

      9.JPG

       

    • Under "Apply to each" action, add a "Compose" action, Inputs field set to WrongEmail variable.

    Image reference:6.JPG

     

    7.JPG

    The flow works successfully as below:13.JPG

     

     

     

    More details about finding group id (Object Id) in Azure Portal, please check the following steps:10.JPG

     

    11.JPG

     

    12.JPG

     

     

     

    More details about configuring a "Run After" action within Microsoft Flow, please check the following article:

    https://flow.microsoft.com/en-us/blog/error-handling/

     

     

    Best regards,

    Kris

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow