<h2>Discovery is failing "ad_hoc:EvalClosure-Insert System, OS and CPU data to cmdb_ci_win_server--412128949; line 1"</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><p style="padding-left: 40px;"><strong><span style="font-size: 10pt;">Discovery is failing with below error:</span></strong></p> <p style="padding-left: 40px;">Identification Engine: Discovery status is FAILURE, Identification sections in pattern failed: section: discovery, error: JAVASCRIPT_CODE_FAILURE: ReferenceError: "JSUtil" is not defined. (ad_hoc:EvalClosure-Insert System, OS and CPU data to cmdb_ci_win_server--412128949; line 1).</p></section></div><div ><h3 >Cause</h3><section><p style="padding-left: 40px;">Access control "Table API" is customised in the instance or disabled and created new "Table API" Access control without adding "snc_platform_rest_api_access" role.</p></section></div><div ><h3 >Resolution</h3><section><ol style="list-style-position: inside;"><li>JSUtil is a mid server script include, supposed to be synched from instance table ecc_agent_script_include, into the mid server application memory, via a REST API /api/mid/v2/glideRecord/ecc_agent_script_include</li><li>For that to work, the MID Server user needs to have the "snc_platform_rest_api_access" role.</li><li>If "Table API" access control is customised then please revert it to OOTB version.</li><li>If you don't want to use the OOTB access control then please provide "snc_platform_rest_api_access" role to mid user.</li></ol></section></div></article></div>