You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

无App Catalog站点权限时,在SharePoint团队站点添加PnP Modern Script Editor应用的替代方案咨询

Adding PnP Modern Script Editor to a SharePoint Team Site Without App Catalog Access

Great question! Let's break down your scenario first: you're a site owner/admin for a SharePoint Team Site, don't have access to the App Catalog or tenant-level SharePoint admin rights, and need to add the PnP Modern Script Editor without going through the App Catalog. Here are your viable alternatives:

1. Directly Upload the PnP Script Editor App Package to Your Site

This works if your site allows custom app deployments (we'll cover how to check that below):

  • First, get the official .app package for the PnP Modern Script Editor from its official release source.
  • Navigate to your Team Site → Click the settings gear → Site contents → Click New → App.
  • On the "Your Apps" page, select the Upload App button in the top-right corner.
  • Choose the downloaded .app package, follow the prompts to upload and install it to your site.

Check/Adjust Custom Script Permissions

This method requires your site's custom script restriction to be disabled. To verify and adjust this (if you have the necessary permissions):

  • Use PnP PowerShell to check the current setting:
    Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive
    Get-PnPTenantSite -Url "https://yourtenant.sharepoint.com/sites/yoursite" | Select-Object DenyAddAndCustomizePages
    
  • If the output is False, you're good to go. If it's True, you'll need to disable this restriction. Note: Changing this setting typically requires tenant-level admin rights—if you don't have that, this method won't work, and you'll need to jump to option 3.

2. Deploy the App via PnP PowerShell

If you prefer a command-line approach, you can use PnP PowerShell to upload and install the app directly to your site:

  • First, connect to your site:
    Connect-PnPOnline -Url "https://yourtenant.sharepoint.com/sites/yoursite" -Interactive
    
  • Then upload and install the app package:
    Add-PnPApp -Path "C:\Path\To\pnp-modern-script-editor.app" -Scope Site -SkipFeatureDeployment
    
  • Same as option 1, this requires the DenyAddAndCustomizePages setting to be False.

3. Build a Custom SPFx Web Part (No App Catalog Needed)

If you can't disable the custom script restriction, building a simple SharePoint Framework (SPFx) Web Part is your best bet. This uses side-loading, which doesn't require App Catalog access:

  1. Set up your SPFx development environment (install Node.js, Yeoman SharePoint Generator, and gulp).
  2. Create a new SPFx Web Part that mimics the PnP Script Editor's core functionality: add a text input field for HTML/JS code, then render that code in the web part.
  3. Enable side-loading on your site: Go to Site Settings → Site Collection Features → Activate the SharePoint Framework Developer Feature.
  4. Run gulp serve --nobrowser to start the local development server, then add the side-loaded web part to your site pages.

This method lets you add script editing functionality without touching the App Catalog or tenant-level settings.


内容的提问来源于stack exchange,提问作者thedeepponkiya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.27 20:17:48