I'm trying to improve the speed of a script that runs through all my tenants trying to find a specific detected application.
On paper it should be possible to expand managedDevices on detectedApps to get a list of devices associated with the application. I don't get an error returned and I tried both beta and 1.0. managedDevices is always empty.This is the case in various tenants I've tried both using API calls in Powershell and using Graph Explorer.
GET /deviceManagement/detectedApps?$filter=contains(displayName, '$($appDisplayName)')&$expand=managedDevices($select=id,deviceName,emailAddress)