This is extra documentation to perform the SWOOP for SharePoint Installation using Site settings (ie. the app is not installed tenant wide). The purpose of this documentation is to cover this extra secure installation path but it is slightly discouraged over the normal installation process as it is more manual and more likely to fail without a SWOOP Level 2 support involvement.
Why does this exist?
This path exists as a tenant wide installation/configuration of a SharePoint instance may not be ideal in some situations (especially in certain industry segments like finance, government) so this is an alternative installation path for those situations.
Process
Instead of using the Tenant Wide Extensions, each site will have to be manually added by using Powershell. This process has to happen with a user with Admin or Owner access.
Adding the app
Go to the Site, click the Cog in the top right, then click “Add an app”, find the “SWOOP for SharePoint JS Tracker” in the SharePoint store then select “Only enable this app” option instead of “Enable this app and add it to all sites”
Opening Powershell
Once the customer has opened Powershell, they have to ensure they have the correct module.
Install-Module -Force -Name PnP.PowerShell
Connecting to each site
Next step, is connecting to the site and following the prompts (replacing $SiteURL with the site URL)
Connect-PnPOnline -Url '$SiteURL' -Device
Finding the ID and Component ID
In order to configure the correct component on the site, the “ClientSideComponentId” is needed. The process is to list all Application Customizers and find the “SWOOP” one, then query the “SWOOP” one for the ClientSideComponentId as seen in the screenshot below. So far the ClientSideConponentId has been 5a4e7bf2-53af-456e-abd7-e3a64f9cd46f (see image below) the same, but always good to double check to avoid surprises!
Get-PnPApplicationCustomizer
(Get-PnPApplicationCustomizer -Identity $Id).ClientSideComponentId
Configuring the Site
Once the ClientSideComponentId is known, the site can be configured by running the following command and replacing the relevant variables ($ComponentId is the ClientSideComponentId and $Config is the SharePoint configuration..
Add-PnPCustomAction -ClientSideComponentId "$ComponentId" -Name "SWOOP Analytics for SharePoint" -Title "SWOOP for SharePoint" -Location ClientSideExtension.ApplicationCustomizer -ClientSideComponentProperties '$Config' -Scope Site
Double checking
(Get-PnPApplicationCustomizer -ClientSideComponentId "$ComponentId" -Scope Site).ClientSideComponentProperties
Note: this can return more than one, if you want to restrict it, use Get-PnPApplicationCustomizer and find the Id then use -Identity instead of -ClientSideComponentId
Removing a Site
Find the ID of the App with Get-PnPApplicationCustomizer and then use the remove command, see the example below
Remove-PnPApplicationCustomizer -Identity "$Id" -Scope Site
Comments
0 comments
Article is closed for comments.