Update WikiPakk (staged)
This article shows how to install an update of WikiPakk to a staging site collection, before rolling out the update to the whole tenant.
This process is different (and has more steps) than the update instructions that don’t involve staging.
Steps Overview
This article describes the following steps:
- Create a staging site and activate the site collection app catalog
- Install the current WikiPakk app package to the staging site
- Add the WikiPakk app to the staging site
- Get the latest WikiPakk update from AppSource and install it to the staging site
While all steps are necessary for setting up the staging site, steps 1 to 3 might be skipped if you reuse the staging site for future WikiPakk updates.
Step 1: Create a staging site and activate the site collection app catalog
Permissions
You need an account that is site collection administrator of the tenant app catalog site and SharePoint administrator.- Create a new site that will be used for staging
- Note: in this article we’ll assume the staging site has the name wikipakk-staging and its addresss is https://contoso.sharepoint.com/sites/wikipakk-staging.
- Using PowerShell, create a site collection app catalog
- Here’s a sample script that uses the PnP.PowerShell module to create the site collection app catalog:
# make sure to install PnP.PowerShell and use PowerShell 7.x # Install-Module PnP.PowerShell -Scope CurrentUser # use an account that has admin permissions on the tenant app catalog site; note that even when using a tenant admin account you might have to first grant them those permissions; also, connect to the -admin endpoint, otherwise the cmdlet will complain; it also seems that you need to be SharePoint admin to make this connection, though I am not entirely sure about that Connect-PnPOnline https://contoso-admin.sharepoint.com -Interactive # this adds the site collection app catalog; note that it can take a couple of minutes until this is fully functional, but it might also work instantly Add-PnPSiteCollectionAppCatalog -Site "https://contoso.sharepoint.com/sites/wikipakk-staging"
- Here’s a sample script that uses the PnP.PowerShell module to create the site collection app catalog:
- The Site Contents of the staging site should now show the Apps for SharePoint library:
Add account to site collection administrators of the tenant app catalog.
Troubleshooting
If you don’t connect to the -admin endpoint, or miss permissions on that level, the following error will be shown:
Add-PnPSiteCollectionAppCatalog: Unable to connect to the SharePoint Online Admin Center at ‘https://contoso-admin.sharepoint.com’ to run this cmdlet. Please ensure you pass in the correct Admin Center URL using Connect-PnPOnline -TenantAdminUrl and you have access to it. Error message: Attempted to perform an unauthorized operation..
If you lack permissions on the tenant app catalog site the following error will be shown:
Add-PnPSiteCollectionAppCatalog: Attempted to perform an unauthorized operation.
Here’s how to add an account to the tenant app catalog site’s admin list:
Add account to site collection administrators of the tenant app catalog.
Step 2: Install the current WikiPakk package to the staging site
We need to get the current WikiPakk app package to add it to the staging site.
- Open the tenant app catalog site
- Open the Apps for SharePoint library in the tenant app catalog site
- Download the current version of WikiPakk:Note: this downloads a WA200005439.cab file
Add account to site collection administrators of the tenant app catalog.
- Extract the cab file you downloaded in the previous step; it contains a single sppkg file like f82ae112018660069bacdf301eca7f1c.sppkg
- note: a cab file is an archive like a zip file; the cab file format is mostly used by Microsoft; you might need additional tools to extract that cab file, depending on your operating system
- Open the staging site
- Open the Apps for SharePoint library in the staging site
- Deploy the sppkg file to the Apps for SharePoint library:
- Check that the Enabled column shows Yes, the Deployed column shows Yes, and the App package error message column shows No errors.
Step 3: Add WikiPakk to the staging site
Now that WikiPakk has been deployed to the “local app store” (the site collection app catalog), the app can be added to the staging site.
- As site owner, open the home page of the staging site
- Click the + New button, then click App to add an app
- You now have two WikiPakk apps to choose from: one with a proper app icon (from the tenant app catalog) and one with a generic icon (from the staging site); click Add for the WikiPakk app with the generic icon:
- Now wait a minute and go back to the staging site’s home page
- The Page Tree button should be visible in the upper right corner; click that Page Tree button to expand the page tree panel, then click the ? in the page tree panel to have a look at the WikiPakk version:
Good, we are now ready to update.
Step 4: Get the latest WikiPakk release from AppSource
The site collection app catalog does not allow us to update the app from AppSource. We thus have to get the lates WikiPakk app package ourselves.
- Enter the following address in your browser address bar and press Return: https://addinsinstallation.store.office.com/app/download?assetid=WA200005439
- note: this address is the same address SharePoint uses to get the latest release when updating the app in the tenant app catalog
- note: this should download a cab file like Roq9de20691-b34e-410d-a96c-641f230268e9_f82ae112018660069bacdf301eca7f1c.cab
- Proceed with this cab file as described in above section Step 2: Install the current WikiPakk package to the staging site, steps 4 to 8; you’ll extract the cab, get a sppkg, upload that to the app catalog and deploy the app
Check that the app has a new version:
Now check the page tree version as well:
That’s it. That was the update. You can now test the update in the staging site.
Note about subsequent updates
Once the staging site is in place, you can reuse it for subsequent updates. This means that above steps 1 to 3 don’t have to be repeated. It’s just step 4 - the actual update - that has to be done.
But you can always discard the staging site and start from scratch.
Wrap-up
In this article we prepared a staging site for WikiPakk updates.
We downloaded the current (old) release of WikiPakk that is currently installed in the SharePoint tenant app catalog. We installed this old release in the staging site.
We then downloaded the latest WikiPakk release from AppSource and updated the WikiPakk app in the staging site.
As result, we have an updated WikiPakk app in the staging site. All other sites in the tenant still use the old WikiPakk releaes from the tenant app catalog.
This allows us to test WikiPakk updates in the staging site before rolling it out to the whole tenant.