Get-MgApplication

What is Get-MgApplication?

Get-MgApplication is a Microsoft Graph PowerShell cmdlet used to retrieve Azure AD (Microsoft Entra ID) application registrations from your tenant. These applications include enterprise apps, custom app registrations, service principals, and integrations created for authentication, automation, or SaaS access.

It helps admins list apps, fetch app details, and query registrations based on filters like display name, creation time, or search keywords.

🚀 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-MgApplication?

Get-MgApplication is useful because it enables automation and reporting around app registrations, such as:

  • Auditing tenant applications for security or compliance
  • Finding unused or stale apps based on created date or naming patterns
  • Tracking app ownership and configuration
  • Supporting automation workflows like exporting app inventories or validating apps before updates
  • Reducing manual admin-center effort, especially in large tenants with hundreds of apps

Prerequisites

Before using this cmdlet, make sure you have Microsoft Graph PowerShell installed and connected:

Install-Module Microsoft.Graph -Scope CurrentUser
Connect-MgGraph -Scopes "Application.Read.All"

If you plan to update or delete apps later, use Application.ReadWrite.All.


How to use Get-MgApplication?

You can run Get-MgApplication with no parameters to list apps, or use -ApplicationId, -Filter, -Search, and -Property for targeted results.

Basic syntax (essential parameters):

Get-MgApplication [-Property <String[]>] [-ConsistencyLevel <String>]

Get-MgApplication Examples

  • Get All Applications
  • Get-MgApplication

    Retrieves all application registrations in your tenant.

  • Get a Specific Application by ID
  • Get-MgApplication -ApplicationId <application-id>
  • Get Applications Using Search Parameter
  •  Get-MgApplication -ConsistencyLevel eventual -Search "DisplayName:Test"

    Returns apps whose display name matches the search string.

  • Get Applications By Display Name Using Filter Parameter
  • Get-MgApplication -ConsistencyLevel eventual -Filter "startsWith(DisplayName, 'My first')"

    Lists apps whose DisplayName begins with “My first”.

  • Get Applications By Created Date Using Filter Parameter
  • Get-MgApplication -Filter "createdDateTime ge 2023-01-01T00:00:00Z"

    Retrieves apps created on or after Jan 1, 2023.

  • Get Applications Created In The Last 5 Months Using Filter Parameter
  • $last5months = (Get-Date).AddMonths(-5).ToString("yyyy-MM-ddTHH:mm:ssZ")
    Get-MgApplication -Filter "createdDateTime ge $last5months | select-object DisplayName, AppId, CreatedDateTime

    Filters apps created in the last five months and attempts to output selected properties.


Summary

Key Point Details
Cmdlet Name Get-MgApplication
Purpose Retrieves application registrations from Microsoft Entra ID
Required Scope Application.Read.All (or Application.ReadWrite.All)
Primary Parameters ApplicationId, Filter, Search, Property, ConsistencyLevel
Automation Benefit Enables app inventory, auditing, filtering, and reporting at scale
Use Case Security reviews, lifecycle cleanup, app reporting, automation workflows

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