List Members of a Mail-Enabled Group Including Organizational Contacts

Prev Next

Resolve every recipient: users, guests, and org contacts: that receives mail sent to a distribution or mail-enabled group.

Complexity: Intermediate. Impact: Exchange Online + Groups + Mail Flow + Microsoft Graph + Directory.

Why use this workflow

When a user asks "who actually gets email when I send to group@contoso.com?", a simple member lookup is often not enough. Mail-enabled groups in Microsoft 365 can contain:

  • User objects: internal employees with mailboxes
  • Guest users: external B2B collaborators
  • Other groups: nested distribution or security groups
  • Organizational contacts (orgContact): external recipients synced from on-premises AD or created in Exchange, often representing vendors, partners, or shared aliases

Graph's /groups/{id}/members endpoint happily returns orgContact entries, but their displayName, mail, and proxyAddresses fields come back as null unless your app has OrgContact.Read.All. Admins chasing a "missing recipient" incident frequently hit this wall. This workflow walks through resolving every recipient behind a mail-enabled group, including the org-contact case.

Expected outcomes

  • The group's object ID, display name, mail address, and group type (unified, security, distribution, mail-enabled security)
  • A full list of direct members, with the object type for each (user, group, orgContact, device)
  • Resolved display names and SMTP addresses for org-contact members (requires OrgContact.Read.All)
  • A list of group owners (who can manage membership, and who receives NDRs in some configurations)
  • Optional: flattened/transitive membership if the group contains nested groups

Risks and considerations

Permission scope matters

Without OrgContact.Read.All, organizational contacts appear in /members responses but all their useful properties are null. Admins often misdiagnose this as "empty group" or "broken members". Grant the scope (admin consent required) before concluding the group is misconfigured.

Distribution vs. Microsoft 365 groups

For classic distribution lists (groupTypes is empty, mailEnabled: true, securityEnabled: false), Graph exposes membership read-only. To modify membership you must use Exchange Online PowerShell (Add-DistributionGroupMember), not Graph.

Nested groups and dynamic membership

Direct /members does not expand nested groups. Use /transitiveMembers to see every leaf recipient. Dynamic groups populate asynchronously: very recent rule changes may not be reflected.

Privacy

Enumerating recipients of an internal DL can expose sensitive org structure. Do not export full membership to external systems without approval, and redact guest/external contact addresses in tickets where possible.

Required permissions

PermissionWhy it's needed
Group.Read.AllRead group properties and direct/transitive membership via Microsoft Graph.
GroupMember.Read.AllAlternative least-privilege scope that allows reading members without other group properties.
OrgContact.Read.AllRequired to resolve displayName, mail, and proxyAddresses for organizational contacts that appear as group members.
User.Read.AllResolve details for user members (UPN, mail, accountEnabled).
Directory.Read.AllFallback broad read scope if the tenant has not granted the narrower scopes above.

Ask Dex

Paste the prompt into a Dex conversation.

Prompt for IT admins

List every recipient that receives email when someone sends to {group_email}. Include internal users, guests, nested groups (expanded), and organizational contacts. Resolve contact display names and SMTP addresses even if OrgContact permissions need to be granted first. Return a table of name, email, and member type.

How an end user can ask Dex

Who actually gets emails when I send to {group_email}? I want to make sure the right people are on the list.

Manual steps (admin center)

Step 1: Locate the group

  1. Sign in to the Microsoft 365 admin center as a Global Reader, Exchange Administrator, or Groups Administrator.
  2. Go to Teams & groups > Active teams & groups.
  3. Select the tab matching the group type: Microsoft 365, Distribution list, Mail-enabled security, or Security.
  4. Search for the group by name or SMTP address and open it.

Step 2: Review members in the admin center

  1. Open the Members tab. You will see internal users and guests listed with display name and email.
  2. Note: organizational contacts (external mail contacts) often do not render here with full details. If the count looks lower than expected, continue in the Exchange admin center.

Step 3: Verify full recipient list in EAC

  1. Open the Exchange admin center and go to Recipients > Groups.
  2. Select the group and open Members. EAC reliably shows mail contacts alongside users and nested groups.
  3. Also check Settings > Delivery management to see whether external senders are allowed, and Message approval for moderation rules that can affect who ultimately receives mail.

Step 4: Check nested groups

If any member is itself a group, click into it and repeat. The effective recipient list is the union of all leaf users and contacts across the tree.

Microsoft Graph API

Step 1: Find the group by SMTP address

GET https://graph.microsoft.com/v1.0/groups?$filter=mail eq 'group@contoso.com'&$select=id,displayName,mail,groupTypes,mailEnabled,securityEnabled

Response:

{
  "value": [{
    "id": "0049645a-e18c-46f6-86bc-1bc2a27d22c2",
    "displayName": "marketing-notif",
    "mail": "group@contoso.com",
    "groupTypes": [],
    "mailEnabled": true,
    "securityEnabled": false
  }]
}

An empty groupTypes array with mailEnabled: true indicates a classic distribution list.

Step 2: List direct members

GET /v1.0/groups/{groupId}/members?$select=id,displayName,mail,userPrincipalName

Look at @odata.type on each entry. Values you will encounter:

  • #microsoft.graph.user: internal user or guest
  • #microsoft.graph.group: nested group
  • #microsoft.graph.orgContact: organizational mail contact (often returns null fields without the right scope)

Step 3: Resolve org contacts (requires OrgContact.Read.All)

When an orgContact entry returns null for mail and displayName, re-query each contact by ID against the contacts endpoint:

GET /v1.0/contacts/{contactId}?$select=displayName,mail,proxyAddresses,companyName

Or batch with a filter:

GET /v1.0/contacts?$filter=id eq '{id1}' or id eq '{id2}'&$select=displayName,mail,proxyAddresses

If you receive 403 Insufficient privileges, grant OrgContact.Read.All (admin consent required) and retry.

Step 4: Expand nested groups transitively

GET /v1.0/groups/{groupId}/transitiveMembers?$select=id,displayName,mail,userPrincipalName

This flattens every level of nesting and returns the full leaf recipient set (users + contacts). Note that $select is still subject to the same orgContact caveat.

Step 5: List owners

GET /v1.0/groups/{groupId}/owners?$select=displayName,mail,userPrincipalName

Owners do not receive group mail by default, but they manage membership and are useful context for the requester.

PowerShell

The script accepts a group SMTP address, resolves the group, enumerates direct and transitive members, and re-queries any org contacts to pull their real mail addresses. It handles the common null-field gotcha automatically.

Prerequisites

  • PowerShell 7+ and the Microsoft.Graph module: Install-Module Microsoft.Graph -Scope CurrentUser
  • Scopes: Group.Read.All, OrgContact.Read.All, User.Read.All

Quick interactive run

Connect-MgGraph -Scopes "Group.Read.All","OrgContact.Read.All","User.Read.All"

$group = Get-MgGroup -Filter "mail eq 'group@contoso.com'"
$members = Get-MgGroupMember -GroupId $group.Id -All

# Split by type
$users    = $members | Where-Object { $_.AdditionalProperties['@odata.type'] -eq '#microsoft.graph.user' }
$contacts = $members | Where-Object { $_.AdditionalProperties['@odata.type'] -eq '#microsoft.graph.orgContact' }

# Re-query contacts for real mail addresses
$contacts | ForEach-Object { Get-MgContact -OrgContactId $_.Id }