react-script-editor is not working for external users

john john 1,026 Reputation points
2021-02-08T13:48:42.713+00:00

I added the modern script editor web part to a modern page @ https://github.com/pnp/sp-dev-fx-webparts/tree/master/samples/react-script-editor .. now the web part is working well for internal users while it is raising this error for external user:-

Something went wrong  
If the problem persists, contact the site administrator and give them the information in Technical Details.  
Technical Details  
  
[SPLoaderError.loadComponentError]:  
Failed to load component "3a328f0a-99c4-4b28-95ab-fe0847f657a3" (ScriptEditorWebPart). Original error: Failed to load path dependency "PropertyControlStrings" from component "3a328f0a-99c4-4b28-95ab-fe0847f657a3" (ScriptEditorWebPart). Original error: Error loading https://component-id.invalid/3a328f0a-99c4-4b28-95ab-fe0847f657a3_1.0.0/PropertyControlStrings  
 Unable to load script https://***co.sharepoint.com/sites/AppCatalog/ClientSideAssets/1425175f-3ed8-44d2-8fc4-dd1497191294/react-script-editor-propertycontrolstrings_en-us_92b9e969e3f7ed4b17e1c27dfc789861.js  
  
INNERERROR:  
Failed to load path dependency "PropertyControlStrings" from component "3a328f0a-99c4-4b28-95ab-fe0847f657a3" (ScriptEditorWebPart). Original error: Error loading https://component-id.invalid/3a328f0a-99c4-4b28-95ab-fe0847f657a3_1.0.0/PropertyControlStrings  
 Unable to load script https://***co.sharepoint.com/sites/AppCatalog/ClientSideAssets/1425175f-3ed8-44d2-8fc4-dd1497191294/react-script-editor-propertycontrolstrings_en-us_92b9e969e3f7ed4b17e1c27dfc789861.js  
CALLSTACK:  
Error  
   at t._generateErrorStackForIE (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:870382)  
   at t (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:869900)  
   at t (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:1013797)  
   at e.buildErrorWithVerboseLog (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:1036973)  
   at e.buildLoadComponentError (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:1033012)  
   at Anonymous function (https://modern.akamai.odsp.cdn.office.net/files/sp-client/chunk.systemjs-component-loader_en-us_06fb90fbb103ba8a0bb1.js:1:66104)  
   at Anonymous function (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:13839)  
   at C (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:13815)  
   at R (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:13701)  
   at T (https://modern.akamai.odsp.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_f0e2149359bcca08ea915a43bbe89991.js:1:13279)  

is there a way to fix this? Thanks

Microsoft 365 and Office | SharePoint | For business | Windows
{count} vote

1 answer

Sort by: Most helpful
  1. ZhengyuGuo 10,591 Reputation points Moderator
    2021-02-09T09:31:13.47+00:00

    Hi @john john ,

    ClientSideAssets is a special library which by default allow all internal user access deployed Js files in browser even there is no permission settings in the UI.

    While for external user, the library won't provide any permission even for js file in browser, it's necessary to set at least read permission for all external user.

    To grant permissions to all users including all external users at once, we can do this using SharePoint Online Management Shell by following below:

    Connect-SPOService  
    Set-SPOTenant -ShowAllUsersClaim $true  
    

    Then grant permission to the group named "All Users (membership)":

    65745-image.png

    Referene:

    Permissions Required For External Users To Use Modern UI (SPFx) Components

    Grant permissions to all external users on Client Side Assets library in App Catalog site

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.