Getting "access denied" while installing Collaboration Manager (CM) or saving CM settings

Getting "access denied" while installing Collaboration Manager (CM) or saving CM settings



Problem:

Collaboration Manager crashes during installation or storage process with the following error: 

"Access denied. You do not have permission to perform this action or access this resource."


Possible Reason:

Most probably this behavior is caused by the Custom Script Feature as described here. Basically the issue occurs when the Custom Script Feature is turned off.


Solution:

In order to solve this problem you have to allow users to run custom scripts on self-service created sites.

Follow the steps below to enable scripting from the SharePoint admin center:

1. Sign in to Office 365 with your work or school account.

2. Navigate to the SharePoint admin center.

 

3. Select Settings.

 

4. Under Custom Script choose:

 


 

5. Select OK. It takes up to 24 hours for the changes to take effect.


If you don't want to wait 24 hours for the changes to take effect you can run this Powershell:

______________________________________________________________________
$cred = Get-Credential
$siteCollectionUrl = "https://xxx.sharepoint.com"
Connect-SPOService -url $siteAdminUrl -Credential $cred
$rootsite = Get-SPOSite($siteCollectionUrl)
$rootsite.DenyAddAndCustomizePages 
Set-SPOSite -Identity $siteCollectionUrl -DenyAddAndCustomizePages $false
______________________________________________________________________