powershell icon indicating copy to clipboard operation
powershell copied to clipboard

Failed to deploy SPFx with PS Add-PnPApp - getting error Value of: [CSPConfig] cannot exceed: [100000]

Open kat3ryna-vovk opened this issue 5 months ago • 2 comments

It's not possible to deploy an SPFx to the site collection App catalog when the number of Trusted Script Sources in Content Security Policy is too large (in our case, it was 582). It doesn't work with Add-PnPApp (Add-PnPApp -Path ./myapp.sppkg -Scope Site -Publish) or with ALM PnP. => The app is added to the Site Collection App Catalog, but the status remains Deployed = No. The error is - "Value of: [CSPConfig] cannot exceed: [100000]."

I would expect that command to work well in the scope of site collection. It should not take into account script sources from other site collections. (Trusted Script Sources on tenant level)

I'm using Windows operating system with PSVersion 7.5.3 and PnP.PowerShell 3.1.0 version.

Please check also related issues - https://github.com/SharePoint/sp-dev-docs/issues/10412, https://github.com/SharePoint/sp-dev-docs/issues/10369

kat3ryna-vovk avatar Oct 08 '25 07:10 kat3ryna-vovk

Is the cmdlet working after the trusted script sources are deleted to be below maximum allowed number?

reshmee011 avatar Oct 10 '25 13:10 reshmee011

@reshmee011 Yes

kat3ryna-vovk avatar Oct 10 '25 13:10 kat3ryna-vovk