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 / Issue regarding gettin...
Power Automate
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.

 

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    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

  • rachit0185 Profile Picture
    2 on at

    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.

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard