Creating and customizing the Profile Sync Webjob

Table of Contents

This post is also available in: Deutsch

This article explains how to set up and modify the Profile Sync Webjob and exempt certain elements of the KanBo User Profile from being synced with it’s Office 365 Profile.

The Webjob configuration file

The configuration file for the Profile Sync job is very similiar to the Group Sync configuration file. It starts with the DB Connection String

"ConnectionStrings": {
    "KanBo": "FILL-ME"
  },

Insert the same connection string You are using for Your KanBo

Next, 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"
     }
    ]
   ]
  }

For this section:

{
    "type": "package",
    "name": "auth-aad",
    "client-id": "FILL-ME",
    "tenant": "FILL-ME",
    "thumbprint": "FILL-ME"
   },

Insert the same values You are using in the KanBo config and the Group Sync job

{
   "type": "package",
   "name": "kanbo-api",
   "url": "FILL-ME",
   "thumbprint": "FILL-ME"
  },

Here, insert the url of Your KanBo (https:// included) and the same thumbprint You used in the previous section.

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

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

They are self explanatory as to what they are syncing with what. What is synced in this fashion is:

  • KanBo Users’ First Name with O365 Given Name
  • KanBo Users’ Surname with O365 Surname
  • KanBo Users’ Managing User with O365 Manager
  • KanBo Users’ Phone Number with O365 Phone Number
  • KanBo Users’ About Me section with O365 About Me section

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

  • KanBo “Ask Me About” section with the list of Responsibilities in O365
  • KanBo Profile Picture with the one present on O365

Removing specific synchronization of items is as simple as removing that specific synchronization target section from the appsettings.json

In newer installation, one synchronization section is removed by default, and that is the KanBo User Email. To add the synchronization back, add this section to appsettings.json:

{
     "type": "mapping",
     "graph": "mail",
     "kanbo": "Email"
    },