Mar 20 2024 09:03 AM
To set a little bit of context
We are testing if the application installs on VM that was automatically created by us and reporting the successful installation of the app in a central DB. All the steps involved are done programmatically
We want to do the same test with applications that are in Intune.
The questions are:
1. If I know the application ID from Intune, can I immediately initiate an installation of the app to a VM? This triggering can be done from the VM itself or from an Intune API, whatever is easier to be done.
2. I would like to know if the application installation was successful or not? So for this I have to know that there was an installation attempt and what was the result of this attempt?
Mar 20 2024 12:26 PM - edited Mar 20 2024 12:27 PM
Not completely sure what type of app you are creating. But if you are using Intune to deploy the apps it is in principle most convenient to use the Graph API and create a scrip that uses the Graph Api.
1. This one you can accomplish by assigning the app to a group, you do this by app id indeed, see here: https://learn.microsoft.com/en-us/graph/api/intune-shared-mobileapp-assign?view=graph-rest-beta and use the GroupAssignmentTarget: https://learn.microsoft.com/en-us/graph/api/resources/intune-shared-groupassignmenttarget?view=graph...
2. This is difficult if you like to get some actual installation conformation but it is possible to query the device and verify if the apps is indeed installed after step 1 is completed by using the MobileAppInstallStatusResource: https://learn.microsoft.com/en-us/graph/api/resources/intune-apps-mobileappinstallstatus?view=graph-...
Mar 21 2024 12:35 AM
Mar 21 2024 12:43 AM - edited Mar 21 2024 12:45 AM
Hi I showed you that (at least a method) by assigning the app to a group (dynamic or static) see the first link and read it carefully, you can do this with Powershell, there are no direct cmdlets but use the Rest Api method as described in the link, you can further script assignment to groups also very easy..
Mar 21 2024 12:49 AM
Mar 21 2024 01:43 AM