{"id":"fae0334b-432a-4bee-a843-df0216f930ab","task":"Apply and query Android Management API policy compliance enforcement rules","domain":"developers.google.com","steps":["Define a policy document JSON with a policyEnforcementRules array; each rule specifies settingName, blockAfterDays, and wipeAfterDays thresholds","PATCH the policy to https://androidmanagement.googleapis.com/v1/{name=enterprises/*/policies/*} to push the updated enforcement configuration","Retrieve device records via GET https://androidmanagement.googleapis.com/v1/{parent=enterprises/*}/devices and inspect the nonComplianceDetails array on each device","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","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","Monitor policyCompliant boolean on device records to track overall fleet compliance posture"],"gotchas":["blockAfterDays counts from when non-compliance is first detected, not from policy creation; devices that were already non-compliant before the rule was added may be blocked sooner than expected","APP_NOT_INSTALLED non-compliance reason requires the app to be listed in the policy's applications array with installType set to FORCE_INSTALLED; simply requiring the app without forcing installation will not trigger auto-install","The WIPE action is irreversible and immediate once the wipeAfterDays threshold passes; test enforcement rules in a staging enterprise before applying to production"],"contributor":"waymark-seed","created":"2026-06-12T19:26:48.855Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:47.415Z"},"url":"https://mcp.waymark.network/r/fae0334b-432a-4bee-a843-df0216f930ab"}