Creating and Customizing Profile Sync WebJob

Table of Contents

Overview

This article explains how to set up and modify the Profile Sync WebJob to exempt certain elements of the KanBo user profile from syncing with the Microsoft 365 profile.

WebJob configuration file

The Profile Sync configuration file is very similar to the Group Sync configuration file. It begins with the DB connection string:

  1. Insert the same connection string that you are using for your KanBo.
"ConnectionStrings": {
    "KanBo": "FILL-ME"
  },

Next is the main configuration section, which looks like this:

{
    "type": "package",
    "name": "auth-aad",
    "client-id": "FILL-ME",
    "tenant": "FILL-ME",
    "thumbprint": "FILL-ME"
   },
   {
   "type": "package",
   "name": "kanbo-api",
   "url": "FILL-ME",
   "thumbprint": "FILL-ME"
  },
  {
   "type": "job.profile-sync",
   "name": "profiles"
  },
{
   "type": "profiles-provider.graph",
   "children": [
    [
     "mapping",
     {
      "graph": "responsibilities",
      "kanbo": "AskMeAbout",
      "type": "string[]",
      "separator": ", "
     }
    ],
    {
     "type": "mapping",
     "graph": "aboutMe",
     "kanbo": "AboutMe"
    },
    {
     "type": "mapping",
     "graph": "givenName",
     "kanbo": "Name"
    },
    {
     "type": "mapping",
     "graph": "surname",
     "kanbo": "Surname"
    },
    {
     "type": "mapping",
     "graph": "manager",
     "kanbo": "Manager"
    },
    {
     "type": "mapping",
     "graph": "mobilePhone",
     "kanbo": "Phone"
    },
    [
     "mapping",
     {
      "size": "360x360",
      "kanbo": "Picture",
      "type": "photo"
     }
    ]
   ]
  }
  1. For the strings below, enter the same values that you used in the KanBo configuration and the Group Sync job.

{
    "type": "package",
    "name": "auth-aad",
    "client-id": "FILL-ME",
    "tenant": "FILL-ME",
    "thumbprint": "FILL-ME"
   },
  1. In this section, provide the URL of your Kanban (including the https://) and the same thumbprint that you used in the previous section.
{
   "type": "package",
   "name": "kanbo-api",
   "url": "FILL-ME",
   "thumbprint": "FILL-ME"
  },

The rest of the configuration consists of sync mappings. Most of the mapping sections will look like this:

{
     "type": "mapping",
     "graph": "O365 information",
     "kanbo": "KanBo equivalent"
    },

They are self-explanatory in terms of what they sync with. The following is synced in this fashion:

  • KanBo users’ first name with M365 given name
  • KanBo users’ surname with M365 surname
  • KanBo users’ managing user with M365 manager
  • KanBo users’ phone number with M365 phone number
  • KanBo users’ “About Me” section with M365 “About Me” section

The only synchronization targets written differently due to requiring additional options are:

  • The KanBo “Ask Me About” section contains a list of responsibilities in M365.
  • The KanBo profile picture is the same as the one on M365.

Removing the synchronization of specific items is as simple as removing the corresponding section from the appsettings.json file.

In newer installations, the KanBo User Email synchronization section is removed by default. 

  • To re-add synchronization, add this section to appsettings.json.
{
     "type": "mapping",
     "graph": "mail",
     "kanbo": "Email"
    },

Was this article helpful?

Please, contact us if you have any additional questions.