Setting Up BIM Sync WebJob

Table of Contents

KanBo configuration

  1. Modify the section of the KanBo appsettings.json file:
{
        "type": "job.bim-sync",
        "name": "bim-sync",
        "repeat": "1h",
        "client-id": "",
		"client-secret": "",
		"hostApi": true,
		"hostJob": false
      },

The bold section of the code represents the new part of the BIM configuration in KanBo. It informs KanBo that it is a host for the API but not the entity that synchronizes KanBo Spaces with BIM360 issues.

  1. Save the appsettings.json file and restart the KanBo app to implement the changes.

BIM sync job

  1. Now, you will need to create a WebJob package for the BIM Sync job. It is recommended that you download the Profile Sync WebJob and modify the appsettings.json file, since most of the configuration is already done (database connection string and AAD authentication section). If you do so, make sure to delete the settings.job file containing Profile Sync’s CRON.
  2. There are two things that need to be modified in the configuration. First, the BIM Sync DLL loading.
"KanBo": {
  "config": {},
  "assemblies": [
  {"Path": "PATH/KanBo.BimPlugin.dll"}
  ],
  1. Typically, the assemblies variable is an empty array. However, in this case, you need to add a path to KanBo.BimPlugin.dll. You can find this DLL in the Plugins folder of your KanBo app. An example path in an Azure app service would be C:\home\site\wwwroot\Plugins\KanBo.BimPlugin.dll.
  2. If you are hosting the sync job on a separate app service or server, copy the entire KanBo plugin folder and add it to the job folder. Then, point to it in the path using a full path.
  3. Next, the plugins section:
"plugins": [
   "load-packages",
   {
    "type": "package",
    "name": "auth-aad",
    "client-id": "CLIENT-ID",
    "tenant": "TENANT",
    "thumbprint": "THUMBPRINT"
   },
   {
        "type": "job.bim-sync",
        "name": "bim-sync",
        "repeat": "1h",
        "client-id": "BIM-CLIENT-ID",
		"client-secret": "BIM-CLIENT-SECRET",
		"hostApi": false,
		"hostJob": true
      },
	  {
      "type": "kanbo-api.service",
      "issuer": "kanbo-webjob",
      "url": "https://KANBO-URL",
      "signer": {
        "type": "x509-store",
        "store-name": "my",
        "store-location": "currentuser",
        "key": "thumbprint",
        "value": "THUMBPRINT",
        "valid-only": false
      }
	  }
  ]
  1. The bolded section shows the new code for appsettings.json. The authentication part (lines 3–9) should remain the same. For the BIM Sync section, use the same values as in your KanBo app.
  2. After configuring appsettings.json, save it and zip all the contents of the folder. Then, create a scheduled WebJob using the zipped folder.

Was this article helpful?

Please, contact us if you have any additional questions.