New-MgApplication

What is New-MgApplication?

New-MgApplication is a Microsoft Graph PowerShell cmdlet used to create (register) a new application in Microsoft Entra ID (Azure AD). In other words, it helps administrators programmatically create app registrations that can later be configured for authentication, API permissions, secrets/certificates, and integrations.

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

New-MgApplication is ideal for automation-heavy environments. Instead of manually creating app registrations in the Entra admin center, admins can:

  • Automate large-scale app registration for DevOps pipelines or enterprise app onboarding.
  • Ensure consistent naming and configuration across environments (Dev/Test/Prod).
  • Speed up identity and permissions workflows by chaining creation with automated permission/secret assignment.
  • Support CI/CD scenarios where apps must be created and updated repeatedly without human effort.

This cmdlet becomes especially powerful when paired with other Graph cmdlets like Update-MgApplication, New-MgApplicationPassword, or consent/permission automation.


Prerequisites

Before using New-MgApplication, make sure you have:

  1. Microsoft Graph PowerShell SDK installed
  2. Install-Module Microsoft.Graph -Scope CurrentUser
  3. Connected to Graph with app-management permissions
    You typically need Application.ReadWrite.All (or higher) to create app registrations.
  4. Connect-MgGraph -Scopes "Application.ReadWrite.All"

How to use New-MgApplication?

Basic syntax (essential parameters only):

New-MgApplication -DisplayName <String>

You can optionally pass additional settings like RequiredResourceAccess, SignInAudience, redirect URIs, and more, depending on how advanced the app registration needs to be.


New-MgApplication Examples

  • Example 1: Create a Basic Application
  • New-MgApplication -DisplayName "My New App"

    This creates a simple Entra ID app registration with the specified display name.

  • Example 2: Create an Application with Required Resource Access
  • $requiredResourceAccess = @{
        ResourceAppId = "00000003-0000-0000-c000-000000000000"
        ResourceAccess = @(
            @{ Id = "5778995d-ea1b-4c96-8554-4c13b5c7a61a"; Type = "Scope" }
        )
    }
    New-MgApplication -DisplayName "App with API Permissions" -RequiredResourceAccess $requiredResourceAccess
    

    This creates an app and pre-defines API permissions (resource access) during creation, saving time in post-setup configuration.


Summary

Key Point Details
Cmdlet Name New-MgApplication
Purpose Creates a new application (app registration) in Microsoft Entra ID using Microsoft Graph PowerShell
Required Scope Application.ReadWrite.All
Primary Parameters DisplayName, RequiredResourceAccess
Automation Benefit Enables scripted, repeatable app-registration creation for CI/CD and bulk identity onboarding
Use Case Automating app registrations with predefined API permissions across Dev/Test/Prod environments

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