Skip to content
English - Australia
  • There are no suggestions because the search field is empty.

SWOOP for SharePoint Set Up Guide (Custom)

This guide will walk you through how to set up SWOOP for SharePoint with some unique custom configuration options:

  • Limit the access for the SWOOP for SharePoint data-miner to selected SharePoint sites
    (This is using the SharePoint permission sites.selected)
  • Limit the SWOOP for SharePoint JS Tracker to be installed only on selected SharePoint sites 

Prerequisites required for you to follow these instructions

  1. Check that audit log function in M365 Admin has NOT been turned off. We use this, along with the Microsoft Graph and our JS Tracking app to gather the analytics in SWOOP for SharePoint.
  2. You need an M365 Global Admin available who can grant permissions to the SWOOP for SharePoint data-miner and the SWOOP for SharePoint analytics engine. The specific permissions required are outlined further below.
  3. You have a list of the SharePoint sites you want to include as your "Intranet". The list must consist of either the SharePoint site IDs or the site URLs.
  4. You need to have a person who can run PowerShell commands.

Before you start: Allow the SWOOP for SharePoint data-miner access to the SharePoint sites

Before you start the installation process, you will need to allow the SWOOP for SharePoint data-miner access to the specific SharePoint intranet sites. This is done in PowerShell. Follow the steps below to set up PowerShell and configure SharePoint so the selected intranet sites can be connected to the SWOOP data-miner.

Getting started using PowerShell

You will need the following:

  • PowerShell (v7.4.0 or higher)
  • PnP. Powershell 3.1.0 or later (see Commands below for instructions on how to install it)
  • An Entra application with delegated Sites.FullControl.All permission

This can be done locally or through a Docker container. With a local install, the login can be the Interactive login, with the Docker install (using the image m365pnp/powershell:latest) you have to use the Device login. 

To get a login working, you need an Entra app with delegated Sites.FullControl.All permission with custom redirect to http://localhost (Note: this is NOT the final app used by the miner). 

More information about the app can be found here: https://pnp.github.io/powershell/articles/registerapplication.html

Running PowerShell PnP:

  • Open PowerShell
  • Make sure you have PnP.PowerShell installed. Do that by pasting the following code. Wait for the download to finish. Ensure the code below has completed the download before proceeding to the next step. 
     

    Install-Module -Force -Name PnP.PowerShell

Grant the SWOOP Azure App permission to selected SharePoint intranet sites

  • In PowerShell, paste the following code, replacing the SharePoint site URL with the URL you wish to connect. Replacing the variables with appropriate values. 

    Note: the login requires an Azure application with delegated Sites.FullControl.All permission with a custom redirect to http://localhost. More information can be found on PnP GitHub. This application is NOT the final application the miner uses.
     

    Connect-PnPOnline -Url $SITEURL -ClientID $CLIENTID -Tenant $DOMAINNAME.onmicrosoft.com -DeviceLogin
  • You will be asked to login at https://microsoft.com/devicelogin
  • Paste the grant command and it will allow the Azure Application to connect with the Site.
     

    Grant-PnPAzureADAppSitePermission -AppId "645db201-85c4-490b-a5a8-3054feef2f91" -DisplayName "SWOOP for SharePoint Site Access" -Permissions Read
  • Repeat the above steps for each site URL.

1. Start the installation process

Click on the Manual Miner Permission option to start the installation process, NOTE: you will need Global Admin permission beyond this point to correctly add the enterprise app to your tenant:

Screenshot 2025-07-01 at 11.29.11 am.png

2. Complete the setup form 

Add the details of what you want your SWOOP site to be named, along with your organisational details.

screencapture-try-sharepoint-au2-swoopanalytics-2025-09-24-12_24_31.png
 

Once completed, check your tenant details and click 'Next'.

3. Grant permissions to the SWOOP for SharePoint data-miner

It may take a few minutes to process before you are asked to consent to the miner being activated.


Screenshot 2025-09-23 at 5.51.37 pm.png

Clicking on the Start Consent Process for Data Miner will open a new tab with a url of:

https://miner-[your_org].swoopanalytics.com/  

where [your-org] is the name of the site you entered in the setup form.
 
In the new tab, you will need to log in to M365 using a Global Admin account and accept the permissions when asked:


Screenshot 2025-08-01 at 09.21.17.png

Here is an overview of the permissions that are granted to the SWOOP for SharePoint data-miner:

Permission API  Permission Type
Sites.Selected Microsoft Graph Application
User.Read Microsoft Graph Delegated
User.Read.All  Microsoft Graph Application
Sites.Selected SharePoint API Application (via SWOOPcert)
ActivityFeed.Read O365 Management API Application

 

4. Add the sites you want to include in SWOOP for SharePoint

Refer to your list of the SharePoint sites you would like to add to SWOOP for SharePoint. Copy/paste either the site ID or the site URL. Then click 'Add site':

Screenshot 2025-09-23 at 5.52.59 pm.png

Pro-tip: If you have multiple sites, then use the 'Upload CSV' button to upload a list of your SharePoint sites.

Once you've added the sites, click 'Save'.

5. Generate a token

Click the 'Generate Token' button.  You will see a block of text appear in the SharePoint Configuration box, which you will be using later on to set up the JS Tracking app so it only includes the selected SharePoint sites. 

This is a one-time step, and you do not need to repeat this, even if you need to add additional SharePoint sites at a later stage.

6. Set up the SWOOP for SharePoint JS Tracker app

The SWOOP JS Tracker App is required to be installed to each site which is to be monitored, this can be set up in multiple ways depending if it is available to be added from the SharePoint store or not, and if it is added to all sites or not (read more about this further below).

This app sends information from the user's browser to SWOOP via a Azure ServiceBus queue system, it monitors their movements through the SharePoint intranet pages on the sites which it has been configured to monitor only, no sensitive user information is gathered and most of the data is in ID format related to the internal SharePoint page and site ID’s. 

The SWOOP JS Tracker App is available in the SharePoint store:

Go to the Microsoft Admin Center, and from there access the SharePoint Admin Center. In the SharePoint Admin Center click More Features / Apps / SharePoint Store

In the SharePoint Store, search for "SWOOP" to find the SWOOP Analytics For SharePoint JS Tracker. Click to open.

Screenshot 2025-09-22 at 09.04.22.png

 

Click 'Add to Apps site':

Screenshot 2025-09-22 at 09.05.01.png

 

You will now be asked to "Confirm data access":

Screenshot 2025-09-22 at 09.05.35.png

There are two options:

  • Only enable this app - This will make the app available for all SharePoint sites. However, a SharePoint admin will need to manually enable the extension on each site before continuing to the next step.
  • Enable this app and add it to all sites (recommended) - This will make the JS Tracker work on all sites, and is the simplest. Note that ONLY sites you add via the JS Tracker app in SharePoint (see below) will be tracked by SWOOP Analytics.

Follow the instructions below for either of these options.

OPTION 1: Only enable this app

Go to each of the SharePoint sites you are adding to SWOOP for SharePoint and click ‘Settings’, then click “Add an app”. Then add the SWOOP Analytics JS tracker to the site. Repeat for each SharePoint intranet site.
 

PowerShell, log in to the SharePoint site using this command: 

Connect-PnPOnline -Url "$SITEURL" -ClientId $CLIENTID -Tenant $DOMAINNAME.onmicrosoft.com -DeviceLogin

 

Copy the SharePoint config data and in run this command (replace $CONFIG with the copied content).
(Refer to step xxx above to see where you retrieve this.)

Add-PnPCustomAction -ClientSideComponentId "5a4e7bf2-53af-456e-abd7-e3a64f9cd46f" -Name "SWOOP JS Tracker for SharePoint" -Title "SWOOP JS Tracker for SharePoint" -Location ClientSideExtension.ApplicationCustomizer -ClientSideComponentProperties '$CONFIG' -Scope Site

 

To check if the command has been successfully run use:

(Get-PnPApplicationCustomizer -ClientSideComponentId "5a4e7bf2-53af-456e-abd7-e3a64f9cd46f" -Scope Site).ClientSideComponentProperties

IMPORTANT: If you see more than one "SWOOP JS Tracker for SharePoint" entries listed from the ABOVE command you must remove them both then ensure only one is added, remove them using the below:

Get-PnPApplicationCustomizer (To get the IDs)

Remove-PnPApplicationCustomizer -Identity "$ID" -Scope Site
If you subsequently add more sites to SWOOP for SharePoint, then you also need to update the JSON configuration in the JS Tracker extension. In other words, you will need to do this for the new SharePoint intranet sites you add to SWOOP for SharePoint.

 

 

 

OPTION 2: Enable this app and add it to all sites

Click 'Add' to enable the SWOOP for SharePoint JS Tracker to all sites.

In this step, we will be taking the JSON configuration data from the SWOOP data-miner, and we will add that to the JS Tracker app in SharePoint, so it knows which SharePoint intranet sites to track.

Copy the SharePoint Configuration JSON text from the SWOOP data miner:

Screenshot 2025-09-22 at 09.12.34.png

 

Go to the SharePoint Admin Center. Click More Features / Apps / More Features / Tenant wide extensions and click 'Open':

Screenshot 2025-09-22 at 09.19.41.png

 

Click 'Edit this list' to edit, and edit the 'Component properties' field. Paste the JSON text in this field:

Screenshot 2025-09-22 at 09.20.04.png

Click 'Stop editing this list' to save your changes.


Note: SWOOP will ONLY track sites that are included during this step. No data will be transferred unless they are included in the JSON configuration.

If you subsequently add more sites to SWOOP for SharePoint, then you also need to update the JSON configuration in the JS Tracker extension. In other words, you will need to do this for the new SharePoint intranet sites you add to SWOOP for SharePoint.

IMPORTANT - Add SWOOP to the Trusted Script Sources

Regardless of whether you have chosen option 1 or 2 you need to complete this part of the setup.  

Microsoft implement Content Security Policies (CSP) for SharePoint.  This prevents scripts from running unless they are trusted.  

Once you have added the app, you need to go to the Trusted Script Sources found in SharePoint Online Admin Center > Advanced > Script sources.

Click on add a source and paste in the SWOOP domain:

https://*.swoopanalytics.com

Click on add.image-20251106-001538.png

Switch back to the SWOOP Data Miner for the next step.

7. Allow users access to SWOOP for SharePoint

Now visit the site name you claimed in step 2 e.g. https://[your site name].swoopanalytics.com

You will see a request to grant consent for everyone in your organisation to be able to log into the SWOOP interface using their M365 credentials.

Your SWOOP for SharePoint site will open in a new tab and it will request you log into Microsoft.  You need to log in as a M365 Global Admin to grant the consent. Tick the 'Consent on behalf of your organisation' box and then 'Accept'.


Screenshot 2025-09-23 at 10.42.51.png

SWOOP for SharePoint will be provided with these permissions:

Permission API  Permission Type
User.Read Microsoft Graph Delegated
User.ReadBasic.All Microsoft Graph Delegated
profile Microsoft Graph Delegated
openid Microsoft Graph Delegated
People.Read Microsoft Graph Delegated

 

8. Set up is complete. Initial data-mining is in progress

You will get a confirmation in the SWOOP for SharePoint site that the setup is complete.  It will take anywhere from 2-12 hours for the initial mining to complete.


mceclip19.png

The setup process is now complete and users can access the reports through the URL set up in Step 5.