1

I've encountered an issue where External / Guest users cannot use a SPFX Web part. Web parts instead return the error below:

Something went wrong If the problem persists, contact the site administrator and give them the information in Technical Details. TECHNICAL DETAILS ERROR: Script error for: fe2c2d36-2e8e-422c-a39f-79894b800ac0_0.0.1/ControlStrings http://requirejs.org/docs/errors.html#scripterror CALL STACK: Error: Script error for: fe2c2d36-2e8e-422c-a39f-79894b800ac0_0.0.1/ControlStrings http://requirejs.org/docs/errors.html#scripterror at B (eval at e (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_742e31850b13116ea900f1bc412105ec.js:70:746505), <anonymous>:8:252) at HTMLScriptElement.onScriptError (eval at e (https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-gb_742e31850b13116ea900f1bc412105ec.js:70:746505), <anonymous>:30:244) 

From my research so far it appears that the App Catalog for a Tenancy is not shared externally by default; we've attempted to introduce "Everyone" access through PnP PowerShell, however, that's not working for the Tenancies on which we've seen this issue.

So I guess my questions are:

Is there a replicable work-around for this issue?

If external sharing is disabled by default, what's the recommended alternative approach for the issue? Is this documented anywhere?

6
  • Check this and this. Let me know if it works. Commented Mar 3, 2023 at 14:21
  • Excellent thanks! Now working across two seperate dev tenancies with this setting: learn.microsoft.com/en-us/answers/questions/340173/… Your second link. Commented Mar 3, 2023 at 15:36
  • Great, glad it worked for you! Commented Mar 3, 2023 at 18:32
  • I have added it as an answer below. Please Upvote(^) & accept as an Answer as it helped you & it will help others with similar question in future. It also removes this question from "Unanswered Questions" list. Commented Mar 3, 2023 at 18:33
  • I am checking to see how things are going there on this issue. Commented Apr 6, 2023 at 5:32

4 Answers 4

1

For the avoidance of doubt I followed these steps:

https://learn.microsoft.com/en-us/answers/questions/340173/spfx-webpart-error-for-few-users-failed-to-load-co

First:

Enable external sharing for your tenancy (https://learn.microsoft.com/en-us/sharepoint/change-external-sharing-site)

Second:

Run this PowerShell (under an Administrator account):

Connect-SPOService -Url https://[YOUR TENANCY NAME]-admin.sharepoint.com Set-SPOTenant -ShowAllUsersClaim $true

Third:

Navigate to this location on your tenant (it may be overkill to chnage the settings at this level).

https://[YOUR TENANCY NAME].sharepoint.com/sites/AppStore/_layouts/15/user.aspx

Add a new READ permission for the group "All Users (membership)"

Read access setting

0

By default "Everyone except external users" has read access to the tenant app catalog but not the "Everyone" claim.

First, you need to enable external sharing on the tenant app catalog site via the SharePoint admin center e.g. setting the external sharing policy to "This site can be shared with new and existing guests".

Secondly, you will need to enable the "Everyone" claim (which includes guest users) on the tenant. You can then grant "Everyone" read access by going to the tenant app catalog site and then granting read access via Site Settings.

SharePoint Online: Enable or Disable “Everyone” Group using PowerShell

3
  • Thanks, odd that there's no obvious documentation for this issue. learn.microsoft.com/en-us/answers/questions/340173/… Commented Mar 3, 2023 at 15:36
  • All users membership (mentioned in the answer) is a different claim, I've used the "Everyone" claim which includes guest users. I'm not sure why it's not documented. Commented Mar 3, 2023 at 15:50
  • Do remember to upvote answers/mark as answer to help the community and ensure this question can be deemed "answered" Commented Mar 3, 2023 at 15:54
0

SPFX Web Part need to assign permission to "Everyone" including guest users,

1- Open SharePoint Management Online Shell

2- Run this command :

Connect-SPOService 

3- Enter URL https://-admin.sharepoint.com) and then it prompts for credentials.

4 - Enter SharePoint Admin or Global Admin credentials to connect to your tenant

5- Once the connection is done, run below command:

Set-SPOTenant -ShowEveryoneClaim $true 

6- Now, SharePoint allows resolving a new group named “Everyone”.

7- Grant “Read” permissions to this group on “Client Side Assets” library in App Catalog site (../sites/AppCatalogSite/ClientSideAssets/AllItems.aspx)

Good luck.

1
  • 1
    Thanks, odd that there's no obvious documentation for this issue. learn.microsoft.com/en-us/answers/questions/340173/… Is the way to go, now I just need to research what "All Users (membership)" actually represents before I go near a production tenancy Commented Mar 3, 2023 at 15:38
0

You have to permissions to All Users(membership) on app catalog site where your SPFx solution is deployed.

Follow below steps:

  1. Turn ON external sharing for your M365 tenant.

  2. Download & open SharePoint Online Management Shell and run below commands using administrator account:

    Connect-SPOService -Url https://<tenant>-admin.sharepoint.com Set-SPOTenant -ShowAllUsersClaim $true 
  3. Grant "Read" permissions to All Users(membership) group on App Catalog (https://<tenant>-admin.sharepoint.com/sites/AppCatalogSite/_layouts/user.aspx) or on "Client Side Assets" library (https://<tenant>-admin.sharepoint.com/sites/AppCatalogSite/ClientSideAssets/AllItems.aspx) in App Catalog site as shown below:

    enter image description here

Reference: SPFx web part error for few users : Failed to load component

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.