This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

WikiPakk Licensing

How to license WikiPakk

Licensing WikiPakk follows this pattern:

  1. purchase a subscription, immediately get a license key
  2. choose or create one or more SharePoint sites to store the license key in
  3. make sure WikiPakk can reach the licensing server to keep the license key fresh

Above steps are covered in more detail in the sections below.

How to get a license key

Purchase a license via the Pricing page.

The license key is displayed in the browser after purchasing and is sent via email as well.

The license key looks like this:

-----BEGIN V2 LICENSE-----
eyJhcGciOiJSUzI8NiisInR5cCI6IkpXVCJ9.eyJ3dHYiOiIxIiwiaXNzIjoiaHR
<snip>
GNLn6lkQTtZw4mG16h8Mz6RvxlZMHq_861O80PE0oerk2oDSX-0E0
-----END V2 LICENSE-----

Where to store the license key

You store the WikiPakk license key in SharePoint. It is kept fresh by WikiPakk (more on that in section “How are license keys refreshed”).

After receiving the license key you have three options where to store it in SharePoint. Choose one:

  1. in all sites WikiPakk will be added to
  2. in one dedicated configuration site (more on that in section “How to dedicate a specific site to store the WikiPakk license key”)
  3. in one well-known configuration site under the URL /sites/WikiPakkConfiguration (you have to create that, use a communication site)

Note: Option 2 and 3 are available as of WikiPakk v2.3.0 (released in June 2023).

Ideally you choose one option, although you can combine them.

WikiPakk searches for a license key in the exact order of above list. First in the local site, then it looks in a site you may have dedicated, then it looks in the WikiPakkConfiguration site, if that exists.

WikiPakk uses the first license key it finds.

In any of those sites, you store the license key in the Description field of the Site Pages document library. This is a quick and easy place to store the license key at, and it is always present.

The next section describes in detail how to store the license key.

How to store the license key in the right place

The following instructions apply to any of the sites you might decide to store the license key in. This means, you follow those steps either in

  1. all sites WikiPakk has been or will be added to, or
  2. one dedicated configuration site you choose, or
  3. the default configuration site /sites/WikiPakkConfiguration

As owner of such site, do the following to store the license:

  1. In a browser, open the SharePoint site
  2. Copy the license key to the clipboard (note: the license key is everything from —–BEGIN V2 LICENSE—– to —–END V2 LICENSE—–, including those delimiters)
  3. Open the Library Settings of the Site Pages library
  4. Find the place to edit the Description of the Site Pages library
  5. Paste the license key into the Description edit field
  6. Choose to Save
  7. Reload open pages that show the WikiPakk page tree or breadcrumb

WikiPakk should recognize first-time license keys pretty fast, and manually updated keys within 24h.

Above steps are also covered in this video:

What if a license key is missing or expired

If no license key can be found, or the license key has expired, a red warning is shown above the page tree, stating that no valid license key could be found.

How are license keys refreshed

The license key is bound to a flexible subscription that can be cancelled on a monthly or yearly basis, depending on the subscription type you chose.

Let’s assume a monthly subscription.

The license key is valid for one month and needs to be refreshed after roughly one month.

WikiPakk takes care of refreshing the license key. When the expiration date is near it will ask a licensing server to exchange the old license key with a new one. The licensing server checks that the subscription is still valid and if it is, returns a refreshed license key that is valid for another month.

How to manually refresh the license key

You might want to manually refresh the license key in case you won’t allow WikiPakk to contact the licensing server.

Here’s a PowerShell that asks for a refreshed license:

$licenseKey = "-----BEGIN V2 LICENSE-----
eyJhcGciOiJSUzI8NiisInR5cCI6IkpXVCJ9.eyJ3dHYiOiIxIiwiaXNzIjoiaHR
<snip>
GNLn6lkQTtZw4mG16h8Mz6RvxlZMHq_861O80PE0oerk2oDSX-0E0
-----END V2 LICENSE-----"
$subscriptionId = "ucpD<snip>YpQMw"

$body = @{ LicenseKey = $licenseKey} | ConvertTo-Json

$result = $null
$result = Invoke-RestMethod -Method Post -Uri "https://graph.wikitransformationproject.com/v1.0/wikipakk/subscriptions/update?subscriptionId=$subscriptionId" -Body $body -ContentType "application/json"
$result.LicenseKey

If you don’t have the subscription ID handy, open https://jwt.ms and paste the license key part between —–BEGIN V2 LICENSE—– and —–END V2 LICENSE—– into the input field.

The decoded license key should now show the subscription ID as subscription:

Decoded WikiPakk license

How to dedicate a specific site to store the WikiPakk license key

Here is how you dedicate a SharePoint site of your choosing to store the WikiPakk license key.

You point WikiPakk to the dedicated SharePoint site via a SharePoint storage entity (a.k.a tenant property).

One option to set a storage entity is via PnP PowerShell.

You need:

  • PowerShell 7
  • with the PowerShell module PnP.PowerShell installed
  • a user account that is in the Owners group of the tenant app catalog site (or site collection admin there)

Here’s a script that will connect to SharePoint and set the storage entity used by WikiPakk:

Connect-PnPOnline `
    -Url https://yourcompany.sharepoint.com `
    -Interactive # ^ use any other site if you don't have access to the root site
Set-PnPStorageEntity `
    -Key "wikipakk.licensesiteurl" `
    -Value "https://yourcompany.sharepoint.com/sites/it-configuration-site" `
    -Description "WikiPakk configuration, where to find the current license key" `
    -Scope Tenant
# Get-PnPStorageEntity # <- use this to list all configured storage entities

Above script instructs WikiPakk to look for the license key in site https://yourcompany.sharepoint.com/sites/it-configuration-site.

1 - WikiPakk License Key Lookup and Refresh Flow

This articles shows how WikiPakk searches for and refreshes its license key.

WikiPakk license keys have a validity period. This might be a month or a year, depending on the subscription you are on.

License keys initially have a start and end date baked in and expire at their end date.

Expired license keys need to be refreshed.

When the validity period ends, WikiPakk needs to refresh the license key, usually by connecting to a licensing server. A refreshed key can also be provided manually if connecting the licensing server is not allowed.

The license key refresh flow in a nutshell looks as follows:

  1. Can WikiPakk find an up-to-date, non-expired license key somewhere in the local browser/SharePoint environment?
    • Good: use that. Done.
      Note: The license key that is stored in SharePoint can be updated at any time manually, which would be on a monthly or yearly basis. This can be automated, get in touch if you want to know details on how to automate that.
  2. Can WikiPakk find a expiring or expired license key available, at any location where a license key could be stored?
    • No problem. WikiPakk contacts the licensing server, shows the old license key, and gets a refreshed one that is valid for another period; that is, if the subscription is still active.
      Note: this does only work if there had been a license key configured before, that is now about to expire or is already expired.

Here is the detailed flow: