Question 540
A custom compliance script exits successfully but returns invalid JSON instead of the required schema. What should be implemented to meet this requirement?
Explanation
Correct Answer
Correct output JSON format and the matching rule-definition schema. Compliance evaluation depends on correctly shaped script results and rule definitions.
Incorrect Answers
Intune custom compliance can evaluate defined script output against declared requirements on supported platforms. That is a different operating condition from “returns invalid JSON instead of the required schema”: “check not covered by built-in Intune compliance settings”.
Discovery code needs correct execution context to return reliable device posture. It serves “before the endpoint team verifies its execution permissions”, not “returns invalid JSON instead of the required schema”.
Custom compliance logic must handle missing data and unsupported device contexts safely. That matters for “is missing on unsupported OS versions” rather than the condition “returns invalid JSON instead of the required schema”.