barscaret-downcaret-leftcaret-rightcaret-upcheckchevron-leftchevron-rightfile-pdfinfosign-in-altsignin text-widthtimesyoutube

Installing software with Miradore from ServiceNow

On top of keeping the asset records and device hardware and software inventories up-to-date, integration of Miradore with ServiceNow offers a huge amount of possibilities to automate operative IT tasks. With automating preapproved installation requests in a service management tool, you can achieve significant savings in time, but also reach good end-user satisfaction without compromising the best practices in service delivery measuring.
This is an example of triggering a software distribution using the Miradore web service. Automation could then be taken further by launching a distribution when a user request for preapproved software installation is created in ServiceNow.
Now, time to get our hands dirty. First, create a Distribution operation. This is done by sending an HTTP POST message to the Miradore web service URL: https://<server>/<instance>/connectors/rest.svc/Distribution (replace <server> and <instance> with the correct values from your environment).

Servicenow 01

Servicenow 02

Then in ServiceNow, define a REST Message, which uses the Miradore web service.
Servicenow 03 610×410
${DeviceName}, ${PackageName} and ${User} are variables which must be declared when the REST Message is triggered. Also, notice that the Content-Type header must be defined to use the Miradore web service.
The body of the message looks like the following:
<Request>
<Items>
<Distribution>
<Asset>
<DeviceName>${DeviceName}</DeviceName>
<Status>Active</Status>
</Asset>
<Package>
<FullName>${PackageName}</FullName>
</Package>
<Reboot>False</Reboot>
<User>${User}</User>
<WakeUpClient>true</WakeUpClient>
</Distribution>
</Items>
</Request>
To identify the target asset and package, you can use any attributes of those items. But make sure that the targets are identified uniquely.
Now, let’s test the message by inputting the required parameters. We want to distribute Adobe Reader to a computer and leave also an entry into the event log of the distribution. We need to define the target device ({$DeviceName$}=TPC00280), the package we want to deploy ({$PackageName}= Adobe Reader 10.0.1~1), and the user who created the distribution ({$UserName}=my email address).
Servicenow 04
Run a test:
Servicenow 05
Ok, we can see that something went wrong since the Miradore web service responded with an error code 403. To see further details of the error, we can check the logs from the Miradore server. We’ll go to our Miradore server, browse into the installation folder, and find the web service logs (default: c:Program FilesMiradoreServer<Miradore instancename>logsWebService). We can open the latest of the server side logs and see that our web service user name or password is incorrect. This is the user account that we created in Miradore in order to use the web service API.
Servicenow 06
Let’s double-check the settings in ServiceNow. We’ll write the password again (this time correctly) and update.
Servicenow 07
Let’s try again.
Servicenow 08
Yes, that was it! Now, we have triggered a software installation from ServiceNow to a computer managed by Miradore.
Servicenow 09
You can find more information about the Miradore web service from the Miradore Management Suite product guide (Administrators guide > Connectors > Miradore Web service):

Have fun integrating Miradore with ServiceNow! If you have any questions or comments, please email us at [email protected].