Import SharePoint users to KanBo

In KanBo 2.2 we changed users' management model. Now to add users to board you need to add them first to user section on the landing page. To automate this process you can user user importer tool. User importer can be downloaded here.

To configure user importer follow these steps:

1. Generate KanBo app certificate

If you want to use KanBo API via KanBo.Client.dll you'll have to configure your KanBo app firstly. Inside web.config file in section you have to register X509 certificate that will be used for authentication (you can even generate it by yourself using makecert, see CreateCert.ps1 in Api Sample).

Configure CreateCert.ps1 by changing bolded parts:

# if this script won't launch change those two paths to files included in Helpers folder
$makecert = "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\makecert.exe"
$pvk2pfx = "C:\Program Files (x86)\Windows Kits\8.1\bin\x86\pvk2pfx.exe"
$certname = "kanboapp”
$pwd = "appcertpassword”
$outputDirectory = "c:\Certs\”
New-Item $outputDirectory -ItemType Directory -Force -Confirm:$false | Out-Null
$pvk  =  $outputDirectory + $certname + ".pvk"
$cer  =  $outputDirectory + $certname + ".cer"
$pfx = $outputDirectory + $certname + ".pfx"
Write-Host "Creating .cer certificate file..."
& $makecert -pe -n "CN=$certname" -len 4096 -a sha512 -b 01/01/2012 -e 01/01/2022 -eku -sv "$pvk" -r "$cer"
& "$pvk2pfx" -pvk "$pvk" -spc "$cer" -pfx "$pfx" -po $pwd

2. Register app certificate in KanBo web.config

Change authentication section to:

<provider id="user" type="AppSignedUser">
<signer type="X509SignerFromFile" file="C:\\certs\\user.cer"/>
</provider> -->
<provider id="app" type="AppSignedService" name="SharePoint users import">
<signer type="X509SignerFromFile" file="C:\\certs\\kanboapp.cer"/>

3. Configure AddUsersFromSPProfiles.exe.config

Edit AddUsersFromSPProfiles.exe.config and set following parameters to:

<add key="SPHostUrl" value="”/>
<add key="KanBoUrl" value="”/>
<add key="KanBoInstanceId" value="1"/>
<add key="KanBoTokenProviderId" value=”app”/>
<add key="KanBoServiceCertPath" value="C:\\certs\\kanboapp.pfx”/>
<add key="KanBoServiceCertPassword" value="appcertpassword”/></appSettings>

Double click AddUsersFromSPProfiles.exe to start user import to desired KanBo instance.


To count KanBo users you can execute following command in browser console (while on the landing page).

KB.Api.getData("Users", { Limit: 50000 }).done(function(d){ alert(d.Users.length); });

import users

Is this article helpful for you?