Skip to main content

Apps Intune has detected on the most devices

Which apps does Intune's discovered apps inventory find on the most devices?

Microsoft IntunePowerShell 7.6 Read-only
Cmdlet lint
Passed
25 Nov 2026
Changes anything
No
Read-only
Pinned versions
3

Script

intune-detected-apps-by-device-count.ps1
#Requires -Modules Microsoft.Graph.Authentication, Microsoft.Graph.DeviceManagement
# Intune detected apps, sorted by the number of devices they are installed on. Read-only.
param(
    [int]$Top = 50,
    [string]$Platform
)

Connect-MgGraph -Scopes 'DeviceManagementManagedDevices.Read.All' -NoWelcome

$apps = Get-MgDeviceManagementDetectedApp -All |
    Where-Object { -not $Platform -or "$($_.Platform)" -eq $Platform } |
    Sort-Object -Property @{ Expression = 'DeviceCount'; Descending = $true }, DisplayName, Version |
    ForEach-Object {
        [pscustomobject]@{
            DisplayName = $_.DisplayName
            Version     = $_.Version
            Publisher   = $_.Publisher
            Platform    = "$($_.Platform)"
            DeviceCount = $_.DeviceCount
        }
    }

if ($Top -gt 0) { $apps | Select-Object -First $Top } else { $apps }

Checked automatically against Microsoft's published cmdlet reference. KBY hasn't run it in your tenant; run it in a test environment first.

Reading the output

  • Lists Intune's detected apps with displayName, version, publisher, platform and deviceCount, which Microsoft defines as the number of devices that have installed the app. The top 50 by device count are shown; pass -Top 0 for all of them.
  • Each row is one detectedApp object with its own name and version, so one app can appear on several rows. Device counts aren't added up across rows, because the same device could be counted in more than one.
  • Pass -Platform to list one platform only, using the detectedAppPlatformType values (for example windows, macOS or ios).
  • The script reads every detected app and then filters and sorts them in PowerShell, because the List detectedApps page doesn't document query parameter support.

Sources

The Microsoft reference page for every cmdlet the script calls, plus the API and product pages behind each permission and caveat.

More from KBY that goes with this script.

All scripts