0

Using Graph API Explorer, the following command produces a list of macOS VPP apps that are assigned as "required" to any Group in my Intune tenant:

https://graph.microsoft.com/beta/deviceAppManagement/mobileApps?$filter= isof('microsoft.graph.macOsVppApp') and isAssigned eq true&$expand=assignments($select=intent,target;$filter=intent eq 'required')

However, I would also like to be able filter on specific groups. Here's a snippet of the output of the above command:

screenshot

I'm probably missing something quite simple, but I haven't been able to figure out how to filter my Graph query based on the "groupId" field. This command:

https://graph.microsoft.com/beta/deviceAppManagement/mobileApps?$filter= isof('microsoft.graph.macOsVppApp') and isAssigned eq true&$expand=assignments($select=intent,target;$filter=target.groupId eq '14etcblahblah')

Yields the following error:

"error": {
        "code": "BadRequest",
        "message": "Parsing OData Select and Expand failed: The child type 'target.groupId' in a cast was not an entity type. Casts can only be performed on entity types."

Replacing "target.groupId" with "target/groupId" yields "Parsing OData Select and Expand failed: Could not find a property named 'groupId' on type 'microsoft.graph.deviceAndAppManagementAssignmentTarget'."

Any help in fixing this filtering attempt would be appreciated!

vimuth
  • 5,064
  • 33
  • 79
  • 116
  • did you try "assignments/target/groupId" ? – kadis Apr 07 '23 at 21:36
  • @kadis -- yes; unfortunately that yields a similar error: "Parsing OData Select and Expand failed: Could not find a property named 'assignments' on type 'microsoft.graph.mobileAppAssignment'." – jimmyl2023 Apr 08 '23 at 22:08

0 Answers0