Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
13,575 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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"
]
}
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.