Power Apps: List Members from M365 Groups with MS Graph
Introduction
Listing members of Microsoft 365 Groups directly in Power Apps is a powerful way to build dynamic, user-aware business apps. This post shows how to use the Office365Groups connector and PowerFx to retrieve group members and display them in your app.
Scenario
Suppose you want to:
- Find a specific M365 Group by name (e.g., “Legal Team”)
- List all members of that group in Power Apps
- Use the results for permissions, notifications, or reporting
PowerFx Formula
Here’s how to get the group ID and list its members:
// Find the group ID for a group whose name starts with 'Legal'
Set(
varM365GrouPId,
LookUp(
Office365Groups.ListGroups({'$filter': "startswith(displayName," & "'Legal'" & ")"}).value,
displayName = "Legal Team"
).id
);
// Get all members of the group
Set(colM365GroupUsers, Office365Groups.ListGroupMembers(varM365GrouPId).value);
How It Works
- Office365Groups.ListGroups: Returns all groups matching the filter (e.g., names starting with ‘Legal’).
- LookUp(…, displayName = “Legal Team”): Finds the exact group by display name.
- Set(varM365GrouPId, …): Stores the group ID in a variable for reuse.
- Office365Groups.ListGroupMembers(varM365GrouPId): Retrieves all members of the group.
- Set(colM365GroupUsers, …): Stores the members in a collection for display in galleries, forms, or logic.
Step-by-Step Guide
- Add the Office365Groups connector to your Power App.
- Use the formula above to set the group ID and retrieve members.
- Display the members in a gallery, data table, or use them in logic (e.g., permissions).
- Customize the filter to match your group’s naming conventions.
Practical Tips
- You can filter groups by other properties (e.g., mailNickname, description).
- Use the members collection for notifications, approvals, or access control.
- For large groups, consider paging or delegation strategies.
- Secure your app to ensure only authorized users can view group membership.
Example Output

Conclusion
Power Apps makes it easy to list members from M365 Groups using the Office365Groups connector and PowerFx. Use this pattern to build smarter, more dynamic apps that leverage your organization’s group structure.