Get user install status for Intune apps using graph API

Vishwjeet Tanwar 16 Reputation points
2023-02-13T14:45:26.4+00:00

Hi, can anyone help with script to get user install status for Intune apps using graph API?

There is a script on Github for device install status: https://github.com/microsoftgraph/powershell-intune-samples/blob/master/Applications/Application_InstallStats.ps1

have someone created such script to get user install status for an app? Got this reference on MS site but not really sure how to use that in a script like above.

https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-userappinstallstatus?view=graph-rest-beta

Thanks,

VIshwjeet

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,700 questions
Microsoft Intune Reporting
Microsoft Intune Reporting
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Reporting: The process of giving an account of something that has been observed, heard, done, or investigated.
58 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.
879 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,386 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shashank Kumar Srivastava 0 Reputation points Student Ambassador
    2024-01-17T11:07:15.5166667+00:00
    1. Register your Application:
      • Go to the Azure Portal.
      • Navigate to Azure Active Directory -> App registrations -> New registration.
      • Fill in the necessary details and note down the Application (client) ID and Directory (tenant) ID.
    2. Grant API Permissions:
      • In the same App registration page, go to API permissions.
      • Add the necessary permissions for Intune, such as DeviceManagementApps.ReadWrite.All and DeviceManagementApps.Read.All.
      • Make sure to grant admin consent.
    3. Acquire an Access Token:
      • You need to obtain an access token to make requests to the Microsoft Graph API. You can do this using the client credentials flow or another suitable authentication method.
      • Make a POST request to the token endpoint (https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token) with your client credentials to obtain an access token.
    4. Query Intune Apps Installation Status:
      • Use the acquired access token to make a request to the Microsoft Graph API endpoint for Intune apps installation status.
      • The endpoint for getting app installation status is:
      GET https://graph.microsoft.com/v1.0/deviceAppManagement/mobileApps/{mobileAppId}/userStatuses?$filter=userPrincipalName eq '{userPrincipalName}' Replace {mobileAppId} with the ID of the Intune app and {userPrincipalName} with the user's principal name. @Vishwjeet Tanwar
    0 comments No comments