Azure Cloud to JSM Assets
Import Azure resources like VM’s, networking devices, etc to JSM Assets.
Create a connection to Microsoft Graph by following instructions here. Make sure you give the Azure App Reader role to your subscription.
Azure Cloud uses the same connection but needs “Microsoft.Compute/virtualMachines/read (read/list)” permission.
You can then create an import in OnLink by selecting “Azure Cloud” as the source system. Once connection is established, please review instructions here to get started with setting up an Assets import configuration. You can then access OnLink app from the “Manage your apps” menu to further configure and set the field level mapping.
You will also need to set config:subscription_id parameter in the configuration settings. A subscription id in Azure provides a boundary container for all resources (VM, storage, network, etc.).
You can use this to import Virtual Machines from Azure resources. Here’s the API doc ref. Use the “Fetch API Sample” button to see the list of fields available to map.
You can then create an import in OnLink by selecting “Azure Cloud” as the source system.
Please review instructions here to get started with setting up an Assets import configuration. You can then access OnLink app from the “Manage your apps” menu to further configure and set the field level mapping.
You can use this to import Virtual Machines from Azure resources. Here’s the API doc ref. Use the “Fetch API Sample” button to see the list of fields available to map.
Here’s an example mapping configuration:
key:id=id
map:name=Name
map:type=Type Name
map:location=Location
map:properties.hardwareProfile.vmSize=VMSize
map:properties.osProfile.computerName=Computer Name
config:subscription_id=<suscription id>Here’s a breakdown of some of the mapping configuration items:
Key or Map | Description |
|---|---|
| The keyword “key” refers to using id as a unique identifier. This allows OnLink to update the record. “id” is a text attribute. |
| Specifies the hardware settings for the virtual machine. |
| Specifies the operating system settings used while creating the virtual machine. Some of the settings cannot be changed once VM is provisioned. |
You can use this to import Azure resources like VM’s, networking devices, etc. For VM, here’s the API doc ref
Refer to this link for the sample JSON Response Virtual Machines - List All - REST API (Azure Compute)
OnLink processes data in two steps - Get Data and Import Data. To manually test, you can click on Get Data first and then wait until you see “No more pending records. Data will be imported on next Import run.” message in Job Logs. Then, click on Import. Production runs are fully automated based on the schedule you choose.