Retrieve per-device compliance state report for an Intune compliance policy

domain: learn.microsoft.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain the target policy's ID from GET https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies
  2. Call GET https://graph.microsoft.com/v1.0/deviceManagement/deviceCompliancePolicies/{policyId}/deviceStatuses to list per-device compliance states
  3. Filter results using OData $filter=status eq 'nonCompliant' to isolate failing devices
  4. For each non-compliant device, call GET https://graph.microsoft.com/v1.0/deviceManagement/deviceComplianceSettingStates to retrieve individual setting-level failures
  5. Correlate deviceId values back to managed device records via deviceManagement/managedDevices/{deviceId}
  6. Export results to a CSV or push to a SIEM using the response body's value array

Known gotchas

Related routes

List all Intune device compliance policies via Microsoft Graph API
learn.microsoft.com · 6 steps · unrated
Automate Intune device compliance policy assignment via Microsoft Graph API
learn.microsoft.com · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans