Counting Entra ID Group Members with Power Automate (and emailing the results)


 If you work in Microsoft 365 long enough, you’ll eventually need to answer a deceptively simple question:

“How many people are in that group?”
It might be a distribution group used for company‑wide emails, a security group controlling access to an app, or a Microsoft 365 group backing a Team or SharePoint site. No matter the type, the follow‑up is usually the same—and can you send me the number?
Instead of clicking through admin portals or manually counting members, you can let Power Automate do the work for you. With a single flow and a Microsoft Graph call, you can automatically count members in distribution groups, security groups, and Microsoft 365 groups, then email the result to yourself or anyone who needs it. Once it’s set up, the answer shows up exactly when you need it—no extra effort required.

Why this matters

Group membership numbers aren’t just an IT concern—they’re useful across the business.
  • IT and admins need accurate counts for licensing, access control, and audits
  • Managers want to understand how many people are included in communications or tools
  • Project owners need visibility into who’s actually part of a group or Team
  • Finance and operations care when group membership directly impacts cost
Manually checking group sizes doesn’t scale, especially when the same question comes up week after week. By automating the count:
  • You get consistent, repeatable results
  • You reduce interruptions and one‑off requests
  • You create a lightweight reporting trail without extra tools
And because this approach works across distribution groups, security groups, and Microsoft 365 groups, you can use the same pattern almost everywhere groups are used in your tenant. One solution, many use cases—exactly the kind of automation that quietly makes everyone’s day easier.


Step‑by‑step: building the flow

1. Create your trigger

Use whatever makes sense:
  • Recurrence (daily, weekly, monthly)
  • Manual trigger (run on demand)
  • Event‑based (license changes, form submissions, etc.)

2. Add “Send an HTTP request (V2)”

  • Connector: Office 365 Groups
  • Action: Send an HTTP request (V2)
Configure it like this:
Repeat this step for additional groups if needed.


3. Send the email
Use Send an email (V2) and drop the count directly into the body.
Because the response is already a number, there’s no parsing gymnastics required.

Real‑world scenarios where this shines

✅ License monitoring

Automatically track how many users are assigned to:
  • Copilot
  • ChatGPT
  • Power BI Pro
  • Any license‑driven group
Schedule a weekly or daily email so surprises don’t show up on your invoice.

✅ Access reviews & audits

Need proof of how many users had access at a point in time?
Send the results to:
  • A mailbox
  • A SharePoint list
  • A Teams channel
Instant paper trail.

✅ Change detection

Store yesterday’s count and compare it to today’s.
  • Sudden spike?
  • Unexpected drop?
Trigger alerts when thresholds are crossed.

✅ Executive‑friendly reporting

No portals. No screenshots.
Just a clean email with numbers that leadership understands.

Tips & tricks

  • Exclude guests: The userType eq 'Member' filter keeps counts accurate
  • Multiple groups: Use one flow to query several groups and send a single summary email
  • Time zones matter: Convert timestamps before emailing for cleaner reports
  • Performance win: $count is faster than pulling full member lists
  • Security bonus: Using the connector avoids custom app registrations
  • Store counts in a SharePoint list for trend reporting
    Instead of just emailing the number, save each group count to a SharePoint list with a date/time stamp. Over time, this gives you an easy way to spot growth trends, sudden spikes, or unexpected drops in membership—and it pairs nicely with simple list views, Excel exports, or even Power BI for lightweight reporting.

Wrapping it all up

This is one of those small automations that quietly delivers big value. With just a single HTTP request, Power Automate can give you instant visibility into Entra ID group membership—accurately, securely, and on your schedule.
Whether you’re tracking licenses, preparing for audits, or just tired of answering the same “how many users?” question every week, this approach turns a manual check into a reliable system. Set it once, let it run, and enjoy having the answer waiting in your inbox before anyone even asks.
If you’re already using groups to control access (and let’s be honest—we all are), this is an easy win worth adding to your automation toolkit.