query puzzle

Paul Morris 20 Reputation points
2025-04-24T19:48:33.1+00:00

Learning query about pulling in a device list with fields but cant find any documentation to save my life on how to filter it by OS type to equal IOS. Can anyone show a filter statement? ty

{
    "reportName": "DeviceCompliance",
    "format": "csv",
    "localizationType": "LocalizedValuesAsAdditionalColumn",
    "select" :[
       "DeviceName",
       "UserName",
       "ComplianceState",
       "EnrollmentType"
    ]
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,575 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 117.9K Reputation points MVP Moderator
    2025-04-25T05:03:23.6266667+00:00

    Simply add the filter in your query:

    {
        "reportName": "DeviceCompliance",
        "filter": "(OS eq 'iOS')"
        "format": "csv",
        "localizationType": "LocalizedValuesAsAdditionalColumn",
        "select" :[
           "DeviceName",
           "UserName",
           "ComplianceState",
           "EnrollmentType"
        ]
    }
    

    As a generic hint for working with Intune and the Graph API, you can use the browsers' network trace feature (F12) to see the exact query made. For example, open the Reports page > Device compliance > Reports > Device compliance, hit F12 to ensure the query is captured, configure the filter per your linking and hit the Generate report button.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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