detectedApp resource relationship to managedDevices in Graph API

Chen, Byron 5 Reputation points
2023-06-21T17:31:31.86+00:00

Based on the detectedApp resource page for the Graph API, there is a relationship with the managedDevices resource.

When I try to use the expand parameter, the results for managedDevices are empty, selecting properties has no effect:

GET https://graph.microsoft.com/v1.0/deviceManagement/detectedApps?$expand=managedDevices

 {
            "id": "",
            "displayName": "Adobe Acrobat (64-bit)",
            "version": "22.003.20282",
            "sizeInByte": 0,
            "deviceCount": 17,
            "publisher": "",
            "platform": "windows",
            "managedDevices": []
        },

Is the expand Parameter not supported for this relationship?

Microsoft Security | Intune | Other
Microsoft Security | Microsoft Graph
0 comments No comments
{count} vote

3 answers

Sort by: Most helpful
  1. Crystal-MSFT 54,206 Reputation points Microsoft External Staff
    2023-06-22T02:20:16.11+00:00

    @Chen, Byron, Thanks for posting in Q&A. Based on my checking, for the relationship with the managedDevices, I find we can use it to query one discovered app's managed device using the following method:

    Action: Get

    URL:https://graph.microsoft.com/beta/deviceManagement/detectedApps('<appid>')/managedDevices?$filter=&$top=20&$skip=0

    Note: Change the appid with the one in your environment.

    User's image

    Hope the above information can help.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Crystal-MSFT 54,206 Reputation points Microsoft External Staff
    2023-06-26T02:36:34.1833333+00:00

    @Chen, Byron, How's everything going? I am writing to see if the above information can help. If there's anything else we can help, feel free to let us know.


  3. M R Naveen Kumar 0 Reputation points
    2024-12-02T09:04:15.6266667+00:00

    I have thousands of applications. I am trying to discover all the managed devices. Would it be better to iterate over all the application IDs, or is there a way to retrieve all managed devices and all detected applications using two API requests, one for devices and one for applications, to obtain all the fields with a common key between the two tables?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.