Automated user and licenses management for enterprises

With KanBo licensing plugin you can automate the process of managing users in KanBo. Additionally the plugin enables you to add and remove KanBo licenses to/from users (avtivate or deactivate). The plugin can be used as a CMD and Powershell script.

Installing KanBo licensing plugin

1. Firs, generate a pair of certificates (.cer and .pfx) using Makecert.exe (Microsoft’s utility), IIS or this script.

Contact KanBo support at support@kanbozone.com for a required plugin package.

2. Go to https://YourKanBoAddress.scm.azurewebsites.net (adjust the name) , then select Debug Console -> Powershell.

3. Go to site -> wwwroot folder and open Extensions folder. Upload the CustomLicensingApi.dll there. To do it, Drag&Drop zip folder containing the .dll over left side of Kudu file explorer.

4. In Extensions folder, create a subfolder and call it CustomLicensingApi.

5. Go to CustomLicensingApi folder and upload the .cer certificate there. Pack the .cer certificate in a .zip folder and Drag&Drop it into left side of Kudu file explorer.

6. In site -> wwwroot, open web.config and start editing it. Add the following entry in <plugins> section. Adjust the certificate name to match yours.

<custom-licensing-api url="CustomLicensingApi" allow-user-adding="true">
<cert type="content" name="YourCertificateName.cer" />
</custom-licensing-api>



Adding Users to KanBo using Licensing plugin

Move the KanBoLicenseTool.zip to your C drive.

Unzip the KanBoLicenseTool.zip in the same location – drive C.


Open Command Prompt or PowerShell on your PC.

Run the command cd c:\ and hit enter. Now run the command cd KanBoLicenseTool\UseLicenseApi and hit enter.

Now to add an Office 365 user to KanBo, you must adjust the following command.

    -Your KanBo Address,

    -User’s email,

    -Path to certificate (PFX). Example: c:\certs\mycertificate.pfx

    - Certificate’s password.

    You can adjust it on Notepad. Run the command in CMD.

    UseLicenseApi --url https://YourKanBoAddress/plugins/CustomLicensingApi --email="email" --cpath "certificate path" --cpass "certificate password” --fn ensure

    TIP: You must use the primary email of user - not an alias.


    If you intend to call the API in Powershell, you must start the command with .\UseLicenseApi.exe. The rest of command remains the same.



    Here you can see the result of running the command. The result is ok.


    Modify licenses - assign or remove licenses from users

    Assign a KanBo license

    Open Command Prompt or PowerShell on your PC.

    Run the command cd c:\ and hit enter. Now run the command cd KanBoLicenseTool\UseLicenseApi and hit enter.

      Now to add a license to the user, you must adjust the following command. You can adjust it on Notepad. Simply enter user’s email to which you would like to give a license to instead of field USER’S EMAIL. Run the adjusted command.

        UseLicenseApi --url https://YourKanBoAddress/plugins/KanBoAPISwisscom --email USER’S EMAIL --cpath "Path to the certificate i.e.:c:\certs\mycert.pfx" --cpass "your certificate password" --fn set --level 2


        If you intend to use call the API in Powershell, you must start the command with .\UseLicenseApi.exe. The rest of command remains the same.

          As a result, you will see that:

          The setting of the user of ID 40 has been changed,

          LicenseType: 2 has been added which means that the user has the license now

          The result code is okay which means that the action was successful.

          Remove a KanBo license

          To remove a license from the user, simply adjust the command by changing the USER’S EMAIL to a real user’s email and run it in CMD in the same directory.

            UseLicenseApi --url https://YourKanBoAddress/plugins/KanBoAPISwisscom --email USER’S EMAIL --cpath "Path to the certificate i.e.: c:\certs\mycert.pfx" --cpass "your certificate password" --fn set --level 0


            If you intend to call the API in Powershell, you must start the command with .\UseLicenseApi.exe. The rest of command remains the same.

            TIP: To specify the users for which you would like to modify the license, you can use three ways in the command.

            • User’s email address

            Example --email kaiser@mykanbo.onmicrosoft.com

            • User’s ID. You can see the ID by entering KanBo Content database and seeing dbo.Users table. There you will see users with their matching IDs.

            --id=1

            • User’s profile, example:

            --profile "admin@mykanbo.onmicrosoft.com"

            If you intend not to use email, but rather ID or Profile, simply replace –email …. In the command above.

            This article was helpful for 1 person. Is this article helpful for you?