Fix Intune Error 65010
Invalid datatype for a discovered setting — the script returned a value whose type does not match the JSON definition.
Open the log below first. It is the quickest way to confirm which of the causes applies before you change anything.
Folder: C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\
Also check: AgentExecutor.log · Detection script output (the JSON the script returned) · Device compliance report (Intune admin center > Reports > Device compliance > Noncompliant devices and settings)
Root causes
- The script returns a string where the JSON expects a number or boolean, or the reverse.
- A version is returned as a string instead of a number.
- The JSON defines the setting with one datatype and the script returns another.
- PowerShell type coercion changed the value — for example "true" as a string.
Step-by-step remediation
- Open the compliance report and note the setting and the datatype the JSON expects.
- Run the script locally and check the .NET type of each returned value.
- Cast the value in the script to the datatype the JSON defines.
- Re-upload, sync the device and re-check the report.
For the full diagnosis around this error, read Intune Compliance Policy Not Evaluating: End-to-End Troubleshooting Checklist.
Tighten the rollout around it
Enrollment and compliance errors usually trace back to rollout design and device permissions. See how the endpoint privilege management tools compare, and start the next import from a clean Autopilot hardware-hash file.
Compare Intune endpoint privilege management toolsRelated Error Codes in This Category
Other Compliance & Sync errors with their own runbooks.
- 0x87D1FDE8Intune sent a setting and the response did not match what it expected (Remediation failed). Often cosmetic, but a real failure if the setting is not applied.
- 0x80072F9AThe manual sync could not start. If the TPM was reset, the device lost its Entra identity and must be re-enrolled.
- 65007The custom compliance script returned failure — the detection script exited non-zero or reported failure, so the setting was not evaluated.
- 65008A setting from the custom compliance JSON is missing in the script result — the script did not return that setting at all.
- 65009Invalid JSON for a discovered setting — the script returned something that is not valid JSON for that setting.