Use SharePoint|sapiens Employee Training Management on a group site or no-script site

The following article describes the reason and what to do if you want to use the SharePoint|sapiens Employee Training Management add-in on one of your SharePoint sites and you see the following message:

You cannot use the add-in on this SharePoint site. Learn why.

Reason

You see this message if you are either using an Office 365 group site or if users are not allowed to run custom scripts on this site. Scripting capabilities are disabled by default for: Personal sites, Self-service created sites, Group sites, Communication sites and the Root Site Collection of the Tenant.

Resolution

To enable scripting on a particular site collection immediately, use the following PowerShell command using the SharePoint Online Management Shell.

# Change this URL to match your admin site
Connect-SPOService -Url https://<yourdomain>-admin.sharepoint.com
# Enter username and password
# Change this URL to match your SharePoint site
Set-SPOSite -Identity https://<yourdomain>.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages $false
# Change this URL to match your admin site
Connect-SPOService -Url https://<yourdomain>-admin.sharepoint.com
# Enter username and password
# Change this URL to match your SharePoint site
Set-SPOSite -Identity https://<yourdomain>.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages $false

If you still receive the same message, please check your script again and make sure you used the full URL to your SharePoint web site.

Alternatively you can also enable custom scripts in the SharePoint admin center, but this approach only works for SharePoint MySites, Personal OneDrive sites or any SharePoint site collection created based on self-service site creation.

In the SharePoint admin center, click on settings and check the Custom Script section.

SharePoint custom script settings

Any change to the custom script setting made through the SharePoint Online admin centre may take up to 24 hours to take effect.