Querying App Installation Status on Intune via Microsoft Graph API

Sara Caballero 40 Reputation points
2024-03-05T09:39:35.3066667+00:00

I am attempting to use the Microsoft Graph API to determine the number of installations for a managed app on Intune, as guided by the documentation provided here: Using the Microsoft Graph API for Intune.

According to the documentation, the process involves:

  1. Retrieving a list of devices registered to a user from Azure Active Directory (/beta/users/{user}/ownedDevices).
  2. Viewing the list of applications for my tenant (/beta/deviceAppManagement/mobileApps).
  3. Using the application ID to determine the installation state for the application (/beta/deviceAppManagement/mobileApps/{id}/deviceStatuses/).

However, when attempting the last step to determine the installation state for an application, I receive the following error:

{
    "error": {
        "code": "BadRequest",
        "message": "Resource not found for the segment 'deviceStatuses'.",
        "innerError": {
            "date": "2024-03-05T09:28:17",
            "request-id": "62770404-6e5a-4ccb-9378-95dc65066afb",
            "client-request-id": "0cc59869-1b6d-1621-191e-63669a2ff226"
        }
    }
}

Could you please provide guidance or an alternative method to achieve the same result? It seems there might have been changes or updates in the API that are not reflected in the current documentation.

Thank you for your assistance.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,253 questions
Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
909 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,666 questions
0 comments No comments
{count} votes

Accepted answer
  1. Crystal-MSFT 45,656 Reputation points Microsoft Vendor
    2024-03-06T03:48:13.03+00:00

    @Sara Caballero Thanks for posting in Q&A. For the API /beta/deviceAppManagement/mobileApps/{id}/deviceStatuses/, the properties for the installation state of a mobile app for a device are deprecated in May, 2023. So you get error when query.

    https://video2.skills-academy.com/en-us/graph/api/resources/intune-apps-mobileappinstallstatus?view=graph-rest-beta

    Now we use the following query to get the app installation status report.

    Action POST

    https://graph.microsoft.com/beta/deviceManagement/reports/getDeviceInstallStatusReport

    Request Body:

    {
        "select": [
            "DeviceName",
            "UserPrincipalName",
            "Platform",
            "AppVersion",
            "InstallState",
            "InstallStateDetail",
            "AssignmentFilterIdsExist",
            "LastModifiedDateTime",
            "DeviceId",
            "ErrorCode",
            "UserName",
            "UserId",
            "ApplicationId",
            "AssignmentFilterIdsList",
            "AppInstallState",
            "AppInstallStateDetails",
            "HexErrorCode"
        ],
        "skip": 0,
        "top": 50,
        "filter": "(ApplicationId eq 'c24ef1b7-7f84-4976-869c-1cdae0b32983')",
        "orderBy": []
    }
    

    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.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Greg Hall 0 Reputation points
    2024-03-05T10:10:17.4433333+00:00