We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

using the mid.jar MANIFEST.MF build details to get the actual ServiceNow version?

stevemac
Tera Guru

Hi,

 

We face a challenge with instance upgrades (full and patch) and our CyberArk (CP) integrations.  The CyberArk Hash value for mid.jar changes with each version.

 

We have semi-automated the generation of the Hash value as follows:

  • Download the new version of the MID Server Agent zip file from install.service-now.com to the MID Server host (using the build date and tag information)
  • Extract the contents of the zip file into a temporary directory
  • from the instance (via a custom widget and using a custom flow / powershell), execute the Cyberark Hash utility against extracted mid.jar file
    • this will return the hash value and get the package.filename value from agent\packaage\meta\mid-core.meta.properties

I'd like to get to the stage where we only extract the mid.jar file and determine the ServiceNow version from mid.jar.   The issue is I cannot  find the "friendly" ServiceNow version from the mid.var file.  I can get the build info from the manifest file, but have no idea how to get the ServiceNow version from that

 

  • Is anyone aware how to use the MANIFEST.MF (\agent\lib\mid.jar\META-INF\) information in the JAR file to get the ServiceNow version?
  • is there anything else in mid.jar that can be used to get the version?

thanks,

 

Steve

 

3 REPLIES 3

Tanushree Maiti
Giga Sage

Please refer this links, see if it helps you:

How does a MID Server know what version it is running? - Support and Troubleshooting

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Thanks for this.  I was aware of these files.   I am trying to determine the version from mid.jar.  It changes in each release (which causes the CyberArk utility to generate a different Hash value).   

Hoping anyone with knowledge of mid.jar or any ServiceNow API  / lookup for mid.jar build details would chime in if possible (or impossible)

I'm not really following so might be it's not helpful but you can get a handful of information from instanceinfo.do and xmlstats.do. 

fetch("https://<>.service-now.com/InstanceInfo.do?SOAP", {
  method: "POST",
  headers: {
    "Content-Type": "text/xml;charset=UTF-8",
    "SOAPAction": "Get",
    "User-Agent": "internal_soap_client"
  },
  body: `
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:tns="http://www.service-now.com/GetMIDInfo"
 xmlns:m="http://www.service-now.com"
 xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Body>
    <m:execute>
      <table xsi:type="xsd:string">ecc_agent_log</table>
    </m:execute>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
`
}).then(r => r.text()).then(console.log);

 

<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
	xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<SOAP-ENV:Body>
		<executeResponse>
			<result>
				<mid_buildstamp>zurich-07-01-2025__patch2-09-24-2025_10-12-2025_0904</mid_buildstamp>
				<mid_version>10-12-2025_0904</mid_version>
				<install_name>[]</install_name>
				<instance_name>[]</instance_name>
				<instance_id>[]</instance_id>
				<build_date>10-12-2025_0904</build_date>
				<build_tag>glide-zurich-07-01-2025__patch2-09-24-2025</build_tag>
				<release_candidate>true</release_candidate>
				<system_id>[]</system_id>
				<node_id>[]</node_id>
				<instance_ip>[]</instance_ip>
			</result>
		</executeResponse>
	</SOAP-ENV:Body>
</SOAP-ENV:Envelope>