Getting App ID from Intune

Available from PowerShell Gallery

Install-Script -Name GetIntuneApps 

Often when troubleshooting application installs from Intune (especially Autopilot), I find myself needing the app ID to see which particular application is failing.

Whilst I can look at the web address, that involves clicking on each app in turn, and with many apps, often having to click View More many times.

Fortunately with Microsoft Graph we can quickly grab the details of each apps and output into a grid view:

This script is a tweaked version of the Microsoft Graph example scripts here which are well worth checking out.

My amended script can be found here

The amendments I have made are at the bottom of the script:

$Intune_Apps = Get-IntuneApplication | Select-Object displayName,id | Out-GridView -Title "Intune Applications" -passthru | ForEach-Object {

$thisapp = get-intuneapplication -Name $_.displayName

$apptype = switch($thisapp.'@odata.type') {
"#microsoft.graph.win32LobApp" {"Win32 App"; break}
"#microsoft.graph.microsoftStoreForBusinessApp" {"Store for Business App"; break}
"#microsoft.graph.officeSuiteApp" {"M365 App"; break}
"#microsoft.graph.windowsMicrosoftEdgeApp" {"Microsoft Edge"; break}
"#microsoft.graph.windowsUniversalAppX" {"MSIX Package"; break}


$appname = $thisapp.displayName
$appid =  $
$apptyef =  $apptype

$App_Assignment = Get-ApplicationAssignment -ApplicationId $


    $assignedtype =  "Application Assigned"

        foreach($Assignment in $App_Assignment){

        $assignedgroup = (Get-AADGroup -id $ 
        $intent = $Assignment.intent


    else {

    $assignedtype = "No Application Assignment"



$Appoutput = @"
Name: $appname
ID: $appid
AppType: $apptype
Assigned: $assignedtype
Assigned Group(s): $assignedgroup
Assigned Intent: $intent


I’ve taken what was a wall of write-host output and dumped it into a Gridview with just the name and ID. When you click on an app and click OK, you’ll see a popup with the details of the application, assignment groups etc.

Hopefully you find this useful!

4 thoughts on “Getting App ID from Intune”

  1. Hi Andrew,
    I get an error when running the script :

    Get-Groups : A parameter cannot be found that matches parameter name ‘id’.

    Can you help me with that ?


  2. Hi There,

    I am having issues with this script and wonder if you can help? on running the script I get the following

    Please specify your user principal name for Azure Authentication: [email protected]

    Checking for AzureAD module…

    Authorization Access Token is null, please re-run authentication…

    I am sure the auth is correct but it is still giving that error

    Hope you can help



Leave a Comment