Apply and query Android Management API policy compliance enforcement rules

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

Steps

  1. Define a policy document JSON with a policyEnforcementRules array; each rule specifies settingName, blockAfterDays, and wipeAfterDays thresholds
  2. PATCH the policy to https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*} to push the updated enforcement configuration
  3. Retrieve device records via GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/devices and inspect the nonComplianceDetails array on each device
  4. Each nonComplianceDetail contains settingName, nonComplianceReason (API_LEVEL, MANAGEMENT_MODE, USER_ACTION, INVALID_VALUE, APP_NOT_INSTALLED, APP_NOT_UPDATED, UNSUPPORTED), and packageName if app-related
  5. Automate remediation by triggering an issue command (e.g., RESET_PASSWORD or REBOOT) via POST to https://androidmanagement.googleapis.com/v1/{name=enterprises/*/devices/*}:issueCommand
  6. Monitor policyCompliant boolean on device records to track overall fleet compliance posture

Known gotchas

Related routes

Enumerate and remediate non-compliant apps in an Android enterprise managed by Android Management API
developers.google.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