This logic app in Azure is an example of how to apply CDESK scripts to import data about computers (PC/Notebook/Server) from ESET PROTECT via the Cloud API into the CDESK Configuration database.
The device data is retrieved from the ESET PROTECT cloud service, then processed and used to create CI items in CDESK.
A similar scenario can be implemented with any other data source, such as your database, the API of other websites, or data stored in files (for example .xlsx or .json). However, because Azure is a cloud service, your data should be extractable from the internet, so local files/DB will not work.
Before running the logic app, the target CDESK environment is expected to have a CI type under the Main groups that contains the following subfields:
Step-by-step guide to creating such a CI type (‚Computers from ESET console‘):
To import an Azure resource group with the required resources, you can use the template in the template.bicep file. For this you will need your subscription ID (Search -> type ‚Subscriptions‘ -> select your subscription or create a new one) and tenant ID (Search -> type ‚Microsoft Entra ID‘).
Then follow the steps below to complete the import:


az deployment group create –resource-group <resource group name> –template-file ./template.bicep –parameters keyVaultName=<key vault name> logicAppName=<logic app name> subscriptionId=<your subscription ID> tenantId=<your tenant ID> cdeskLogin= cdeskPwd= esetLogin= esetPwd= (without <>)
The import process may throw some warnings, but the objects should be created without problems. After some time you should see the newly created resources in the chosen resource group.



The key vault contains some private data that should not be disclosed, such as logins and passwords:
ESET_LOGIN – your login name for the ESET PROTECT account
ESET_PASSWORD – your password for the ESET PROTECT account
CDESK_LOGIN – your login name for the CDESK account
CDESK_PASSWORD – your password for the CDESK account
These values will be assigned during import, but you can change them in the resource group’s key vault.
The logic app has the following parameters that you should set before running it:
CDESK_SERVER – your CDESK server (e.g. ‚cdeskportal.eu‘)
MAINGROUP_ID – ID of the main group of the created CI type
TYPE_ID – ID of the created CI type (‚Computers from ESET console‘)
COMPANY_ID – ID of your company in CDESK
CATEGORY_ID – ID of the category related to the main group
PROPERTY_GROUP_ID – ID of the custom fields group of the given CI type
PROPERTY_TYPE_ID – ID of the type (boolean, integer, string, …) of the custom field of the given CI type
DEVICE_MODEL_ID – ID of the model property
DEVICE_MODEL_BASEPROPERTY_ID – ID of the base model property
DEVICE_SN_ID – ID of the serial number property
DEVICE_SN_BASEPROPERTY_ID – ID of the base serial number property
DEVICE_PN_ID – ID of the external ID property
DEVICE_PN_BASEPROPERTY_ID – ID of the base external ID property
DEVICE_OS_ID – ID of the operating system property
DEVICE_OS_BASEPROPERTY_ID – ID of the base operating system property
DEVICE_TYPE_ID – ID of the device type property
DEVICE_TYPE_BASEPROPERTY_ID – ID of the base device type property
Once all the secrets are in the key vault and the logic app parameters are set, you can run the logic app to perform the import of PC/Server data from ESET PROTECT. The logic app can be triggered by sending a request (POST, empty body) to the URL shown in the trigger element (the first element of the workflow, ‚When an HTTP Request is received‘, or by using the ‚Run Trigger‘ (‚Run‘) button.
Note: If some records (computers/servers) already existed in CDESK before running this script, they will not be created and the script code responsible for importing them will display the status ‚Failed‚. In this case this is fine and the script works as expected. Successfully created records return the status OK (200).
