How to send approval requests to Distributed List (DL) Group in Power Automate

Problem

The Microsoft Flow Approvals connector does not support sending approval requests to groups today or distributed groups.

To demonstrate the issue I have a sample distributed list (DL) group ‘SomeO365DLGroup’.

The DL group has the following members.

Members of the DL group

Created a sample manually triggered flow to send and approval with the DL ‘someo365DLGroup@GOV019539.onmicrosoft.com’. I got the following error.

{
  "error": {
    "code": "InvalidApprovalCreateRequestAssignedToNoValidUsers",
    "message": "Required field 'assignedTo' contained no valid users in 
the organization"
  }
}
Error in the flow

Step by Step Solution

There is an alternative approach, first to get list of members email from the DL group. We will use the “Office 365 Groups” connector with “List group members” action. The action requires to use the group ID.

Step # 1 : Using Azure AD portal get the group id of the distributed list.

To get group id of the distributed list

Step # 2 : Create a Manually trigger with a EmailArray variable as Array datatype.

Step # 3 : In the manually triggered Power Automate make a call to the ‘List group members’

‘List group members’ action.
The output of the above action is.
[
  {
    "@odata.type": "#microsoft.graph.user",
    "id": "17d7b3e9-7e7c-46e5-b16f-2baef2e6cd46",
    "businessPhones": [
      "+1 732 555 0102"
    ],
    "displayName": "Jordan Miller",
    "givenName": "Jordan",
    "jobTitle": "Auditor",
    "mail": "JordanM@GOV019539.OnMicrosoft.com",
    "officeLocation": "19/3123",
    "surname": "Miller",
    "userPrincipalName": "JordanM@GOV019539.OnMicrosoft.com"
  },
   ... other objects are removed brevity
]

Step # 4 : Loop through the output of the above action to get the mail of the each member. Add the mail address in the EmailArray variable.

Loop through the output to get mail address

Step # 5: Finally use the EmailArray variable to create a string with semicolon delimited string.

Use join expression to get the “Email addresses, separated by a semicolon (;)”

Step # 6: Use the output of the above step as the Assigned To field.

Use the output of the Compose to the “Assigned to” field.

Result

The alternate approach to get the list of emails to use in the Assigned to field resolved the issue of the distributed list group mentioned.

About Pankaj

I am a Developer and my linked profile is https://www.linkedin.com/in/pankajsurti/
This entry was posted in Power Automate. Bookmark the permalink.

4 Responses to How to send approval requests to Distributed List (DL) Group in Power Automate

  1. Pingback: How to send approval requests to Distributed List (DL) Group in Power Automate - Microsoft Dynamics CRM Community

  2. Pingback: How to send approval requests to Distributed List (DL) Group in Power Automate - 365 Community

  3. Pingback: Learn how to ship approval requests to Distributed Listing (DL) Group in Energy Automate – Ahosti – Latest IT News Trends

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s