Get-MgApplicationCount

What is Get-MgApplicationCount?

Get-MgApplicationCount is a Microsoft Graph PowerShell cmdlet used to return the total number of application objects (app registrations) in your Microsoft Entra ID tenant. Instead of listing every app, it gives a clean numeric count.

🚀 Community Edition Released!

Try the M365Corner Microsoft 365 Reporting Tool — your DIY pack with 20+ out-of-the-box M365 reports for Users, Groups, and Teams.

Why Use Get-MgApplicationCount?

Admins use this cmdlet mainly for automation and reporting. It helps you:

  • Quickly audit how many app registrations exist in the tenant.
  • Monitor app sprawl and governance risks over time.
  • Automate compliance checks by pairing counts with filters (for example, counting apps by naming standards).
  • Build dashboards or scheduled scripts without pulling full application lists, which is faster and lighter.

Prerequisites

Before running Get-MgApplicationCount, make sure:

  • Microsoft Graph PowerShell module is installed.
  • You are connected to Graph with the right scopes.
  • Install-Module Microsoft.Graph -Scope CurrentUser
    Connect-MgGraph -Scopes "Application.Read.All"
                                                

How to use Get-MgApplicationCount?

Basic syntax:

Get-MgApplicationCount [-ConsistencyLevel <String> ]

To use it, connect to Microsoft Graph first, then run the cmdlet with -ConsistencyLevel Eventual whenever you apply filters or counts. You can also combine it with -Filter to count only apps that meet certain criteria.


Get-MgApplicationCount Examples

  • Example 1: Get the Total Count of All Applications
  • Get-MgApplicationCount -ConsistencyLevel Eventual

    One-liner: Returns the total number of app registrations in your tenant.

  • Example 2: Filter Application Count Using Application Display Name I
  • Get-MgApplicationCount -Filter "startswith(displayName,'My')" -ConsistencyLevel Eventual

    One-liner: Counts only applications whose display name starts with “My”.

  • Example 3: Filter Application Count Using Application Display Name II
  • Get-MgApplicationCount -Filter "displayName eq 'testing-100'" -ConsistencyLevel Eventual

    One-liner: Counts apps that exactly match the display name testing-100.


Summary

Key Point Details
Cmdlet Name Get-MgApplicationCount
Purpose Returns the count of Entra ID application objects
Required Scope Application.Read.All (or higher)
Primary Parameters ConsistencyLevel, Filter
Automation Benefit Enables fast app inventory checks without listing all apps
Common Use Case Tenant governance, naming-standard audits, compliance reporting

Did You Know? Managing Microsoft 365 applications is even easier with automation. Try our Graph PowerShell scripts to automate tasks like generating reports, cleaning up inactive Teams, or assigning licenses efficiently.

Ready to get the most out of Microsoft 365 tools? Explore our free Microsoft 365 administration tools to simplify your administrative tasks and boost productivity.

© Your Site Name. All Rights Reserved. Design by HTML Codex